Configuration
public struct Configuration
Consumer
configuration.
-
Undocumented
See moreDeclaration
Swift
public enum AutoCommit
-
List of bootstrap servers. The bootstrap server is used to fetch the initial cluster state. Bootstrap servers are contacted sequentially, if first server that is reachable will be used to discover all relevant nodes in the cluster.
Declaration
Swift
public let bootstrapServers: [SocketAddress]
-
List of topics the consumer is subscribed to
Declaration
Swift
public let subscribedTopics: [Topic]
-
A name for this client. This string is passed in each request to servers and can be used to identify specific server-side log entries that correspond to this client. Also submitted to GroupCoordinator for logging with respect to consumer group administration.
Declaration
Swift
public let clientID: String
-
The name of the consumer group to join for dynamic partition assignment and to use for fetching and committing offsets.
Declaration
Swift
public let groupID: String
-
Group Instance ID of the group
Declaration
Swift
public let groupInstanceID: String?
-
Session timeout for the consumer. When the broker doesn’t receive a heartbeat from the consumer within this interval, the coordinator will declare the node as dead.
Declaration
Swift
public let sessionTimeout: Int
-
Timeout for rebalance operations
Declaration
Swift
public let rebalanceTimeout: Int
-
Auto commit settings.
Declaration
Swift
public let autoCommit: AutoCommit
-
TLS Configuration to connect to the Kafka broker. See the swift-nio-ssl configuration for details
Declaration
Swift
public let tlsConfiguration: TLSConfiguration?
-
Control if the CRC checksum on record batches recieved from the servers should be validated to detect corruption. Unless you have very high throughput requirements and can handle invalid data, it’s recommended enable CRC validation.
Declaration
Swift
public let crcValidation: Bool
-
init(bootstrapServers:
subscribedTopics: clientID: groupID: groupInstanceID: sessionTimeout: rebalanceTimeout: autoCommit: crcValidation: tlsConfiguration: ) Undocumented
Declaration
Swift
public init(bootstrapServers: [SocketAddress], subscribedTopics: [Topic], clientID: String = "kafka-nio", groupID: String, groupInstanceID: String? = nil, sessionTimeout: Int, rebalanceTimeout: Int, autoCommit: Configuration.AutoCommit = .interval(amount: .seconds(5)), crcValidation: Bool = true, tlsConfiguration: TLSConfiguration? = nil)