Skip to content

Commit 24fd3f0

Browse files
make triggerGracefulShutdown() public (#130)
1 parent 89ac807 commit 24fd3f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Kafka/KafkaConsumer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public final class KafkaConsumer: Sendable, Service {
416416
///
417417
/// - Note: Invoking this function is not always needed as the ``KafkaConsumer``
418418
/// will already shut down when consumption of the ``KafkaConsumerMessages`` has ended.
419-
private func triggerGracefulShutdown() {
419+
public func triggerGracefulShutdown() {
420420
let action = self.stateMachine.withLockedValue { $0.finish() }
421421
switch action {
422422
case .triggerGracefulShutdown(let client):

Sources/Kafka/KafkaProducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public final class KafkaProducer: Service, Sendable {
235235
///
236236
/// This method flushes any buffered messages and waits until a callback is received for all of them.
237237
/// Afterwards, it shuts down the connection to Kafka and cleans any remaining state up.
238-
private func triggerGracefulShutdown() {
238+
public func triggerGracefulShutdown() {
239239
self.stateMachine.withLockedValue { $0.finish() }
240240
}
241241

0 commit comments

Comments
 (0)