Kaffe.Worker (Kaffe v1.26.0) View Source

A worker receives messages for a single topic for a single partition.

Processing the message set is delegated to the configured message handler. It's responsible for any error handling as well. The message handler must define a handle_messages function (note the pluralization!) to accept a list of messages.

The result of handle_messages is sent back to the subscriber. Additionally, the message handler should inform the subscriber on what to do with the offsets after processing the message set.

Link to this section Summary

Link to this section Functions

Entry point for processing a message set received by a subscriber.

Note that the response from the message handler is what dictates how a subscriber should deal with the message offset. Depending on the situation, a message processor may not want to have it's most recent offsets committed.

Link to this function

process_messages(pid, subscriber_pid, topic, partition, generation_id, messages)

View Source
Link to this function

start_link(message_handler, subscriber_name, worker_name)

View Source
Link to this function

terminate(reason, state)

View Source