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
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ SwiftKafka is a Swift Package in development that provides a convenient way to c
9
9
The `sendAsync(_:)` method of `KafkaProducer` returns a message-id that can later be used to identify the corresponding acknowledgement. Acknowledgements are received through the `acknowledgements`[`AsyncSequence`](https://developer.apple.com/documentation/swift/asyncsequence). Each acknowledgement indicates that producing a message was successful or returns an error.
10
10
11
11
```swift
12
-
let config =KafkaProducerConfig(bootstrapServers: ["localhost:9092"])
12
+
let config =KafkaProducerConfiguration(bootstrapServers: ["localhost:9092"])
13
13
14
14
let (producer, acknowledgements) =tryawait KafkaProducer.makeProducerWithAcknowledgements(
15
15
config: config,
@@ -47,7 +47,7 @@ await withThrowingTaskGroup(of: Void.self) { group in
47
47
After initializing the `KafkaConsumer` with a topic-partition pair to read from, messages can be consumed using the `messages`[`AsyncSequence`](https://developer.apple.com/documentation/swift/asyncsequence).
48
48
49
49
```swift
50
-
let config =KafkaConsumerConfig(
50
+
let config =KafkaConsumerConfiguration(
51
51
consumptionStrategy: .partition(
52
52
topic: "topic-name",
53
53
partition: KafkaPartition(rawValue: 0)
@@ -75,7 +75,7 @@ for await messageResult in consumer.messages {
75
75
SwiftKafka also allows users to subscribe to an array of topics as part of a consumer group.
@@ -100,7 +100,7 @@ for await messageResult in consumer.messages {
100
100
By default, the `KafkaConsumer` automatically commits message offsets after receiving the corresponding message. However, we allow users to disable this setting and commit message offsets manually.
/// This field indicates the number of acknowledgements the leader broker must receive from ISR brokers before responding to the request: 0=Broker does not send any response/ack to client, -1 or all=Broker will block until message is committed by all in sync replicas (ISRs). If there are less than min.insync.replicas (broker configuration) in the ISR set the produce request will fail.
0 commit comments