vert-x3 / vertx-kafka-client

Reactive Kafka Client for Vert.x
Apache License 2.0
84 stars 82 forks source link

Fix issue with batchHandler not being called without also using handler #249

Closed danielbcorreia closed 1 year ago

danielbcorreia commented 1 year ago

Motivation:

The Kafka Client API provides two ways of processing records, using the handler and batchHandler methods. It turns out that batchHandler cannot be used independently in the current implementation, since a call to handler (even if the function itself does nothing) is required in order for the batchHandler to be called.

The same issue in #170.

This fix changes the following:

The name multiHandler on the schedule method is not great but I didn't want to shadow the field name, I'm open to suggestions.

danielbcorreia commented 1 year ago

Closing this and opening a new PR with the correct branch