kafka_dae_control.worker_event_handlers
Handlers called by the worker thread.
Members
Act on a Kafka delivery report. |
|
Handle a begin command. |
|
Handle an end command. |
- kafka_dae_control.worker_event_handlers.delivery_report_run_info(done_event: EventWithValue[None], err: KafkaError | None, msg: Message) None[source]
Act on a Kafka delivery report.
This is used for the run info messages to tell anything waiting on these that the message was either delivered or not.
- Parameters:
done_event – The event to call set() or set exception depending on result.
err – The exception given by Kafka
msg – The message sent by Kafka.
- kafka_dae_control.worker_event_handlers.handle_begin(config: ControlConfig, data: Data, producer: Producer, sock: socket, sock_lock: RLock, done_event: EventWithValue[None]) None[source]
Handle a begin command.
- Parameters:
config – the program’s configuration.
data – the data class containing the state of the program.
producer – the Kafka producer.
sock – the socket instance.
sock_lock – the lock to acquire when using the socket instance.
done_event – The event to call set() on when complete
- kafka_dae_control.worker_event_handlers.handle_end(config: ControlConfig, data: Data, producer: Producer, sock: socket, sock_lock: RLock, done_event: EventWithValue[None]) None[source]
Handle an end command.
- Parameters:
config – The program’s configuration.
data – the data class containing the state of the program.
producer – the Kafka producer.
sock – the socket instance.
sock_lock – the lock to acquire when using the socket instance.
done_event – The event to call set() on when complete