Produces message
to kafkaTopic
, blocking until the send call to the brokers is complete.
Produces message
to kafkaTopic
, blocking until the send call to the brokers is complete.
A no-op message handler that cannot be overridden.
A no-op message handler that cannot be overridden.
We wanted this class to fit the shape of an actor so that it could be used
mostly interchangably with regular actors. To do that we had to provide a messageHandler
of some sort. However, because of the nature of the way this class works, it will never
handle messages locally and as such has no implementation for doing so.
Override this method to provide custom success and error handling when the producer has finished its round trip to the broker.
Override this method to provide custom success and error handling when the producer has finished its round trip to the broker. The default implementation will simply log an exception if one occurs and prevent it from being re-thrown.
If ensuring delivery is super-important to your application, you may wish to override this to cause your application to crash if producing isn't working.
Override this method to provide custom error handling when an exception is thrown from the producer's send method.
Override this method to provide custom error handling when an exception is thrown from the producer's send method. The default implementation will simply log the exception and prevent it from being re-thrown.
Please refer to the Kafka documentation for the current kinds of exception the Kafka Producer's send method may return.
Override this method in the implementing class to customize the producer settings to your liking.
A ref to a KafkaActor that will send its message through Kafka.
This class conforms to the LiftActor shape so that it can be plugged into anything that would normally take a LiftActor. However, as we've provided a custom implementation of the send method this actor won't be able to define a working messageHandler.
By default, this producer is configured to ensure all brokers acknowledge a message and to ensure that requests are properly ordered. It's also configured with 10 retries by default. If you'd like to customize these settings, you can override
producerPropsCustomizer
to change theProperties
instance that we use to configure the producer.