Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Producer API #8

Open
tbartelmess opened this issue Oct 2, 2020 · 0 comments
Open

Producer API #8

tbartelmess opened this issue Oct 2, 2020 · 0 comments
Assignees

Comments

@tbartelmess
Copy link
Owner

Currently, Kafka-NIO only features a consumer API, a producer API is missing.

The first version of the producer API will be very similar to the Kafka's Java producer API, and won't support transactions.

class KafkaProducer<K, V> {
    struct Configuration {
       enum Acknowledgements {
           case none
           case leaderOnly
           case fullISR
           case custom(Int)
       }
       batchSize: Int
       linger: TimeAmount?
       memory: Int
       keySerializer: Serializer<K>
       valueSerializer: Serializer<V>
    }
    func send(topic: Topic, key: K, value: V) -> EventLoopFuture<Void>
    func flush() -> EventLoopFuture<Void>
}
@tbartelmess tbartelmess self-assigned this Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant