You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section provides an overview how to quickly get the library up and running.
3
+
Welcome to the Swift Pulsar Client! This guide will help you get started with the library quickly by walking you through the basic setup and usage for both consuming and producing messages.
4
4
5
-
## Consumer
5
+
## Consumer Example
6
+
The following example demonstrates how to create a Pulsar consumer to receive messages from a specific topic.
6
7
7
8
```swift
8
9
importLogging
@@ -12,43 +13,115 @@ import Pulsar
12
13
@main
13
14
structPulsarExample {
14
15
staticfuncmain() asyncthrows {
15
-
//You do not need to provide your own EventLoopGroup.
16
+
//Set up logging and event loop group
16
17
let eventLoopGroup =MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)
17
18
LoggingSystem.bootstrap { label in
18
19
var handler = StreamLogHandler.standardOutput(label: label)
Copy file name to clipboardexpand all lines: Sources/Pulsar/PulsarClient/PulsarClient.swift
+8-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,14 @@ import Logging
16
16
import NIO
17
17
@_exportedimport SchemaTypes
18
18
19
-
/// The core Pulsar Client used to connect to the server. All control of the library, like consumers and producers and its settings are controlled via the Client.
19
+
/// The core Pulsar Client used to connect to the server.
20
+
///
21
+
/// This actor manages the connection to a Pulsar server and provides functionality
22
+
/// for creating and managing producers and consumers. It also handles configuration
23
+
/// of connection parameters and retry mechanisms.
24
+
///
25
+
/// All interactions with the Pulsar messaging system, such as sending or receiving messages,
0 commit comments