Kaffe v1.10.0 Kaffe.Worker

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.

Summary

Functions

handle_cast(arg, state)

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.

init(list)
process_messages(pid, subscriber_pid, topic, partition, generation_id, messages)
start_link(message_handler, subscriber_name, worker_name)
terminate(reason, state)