eventuate-foundation / eventuate-messaging-kafka

Other
15 stars 11 forks source link

Implemented reactive consumer. #48

Closed dartartem closed 3 years ago

dartartem commented 3 years ago

I made it a little bit different than you said.

I think, I simplified approach by keeping biconsumer here: https://github.com/eventuate-foundation/eventuate-messaging-kafka/blob/b7b618dff09401cf12a51b7b59dd4de0d2771e2d/eventuate-messaging-kafka-basic-consumer/src/main/java/io/eventuate/messaging/kafka/basic/consumer/EventuateKafkaConsumerMessageHandler.java#L9

Especially because there is batch processing and is much easier to handle it with callbacks than with multiple futures.

dartartem commented 3 years ago

@cer I fixed this:

Why not just whenComplete(callback::accept)?`