swh.counters.kafka_client module#

class swh.counters.kafka_client.KeyOrientedJournalClient(*args, **kwargs)[source]#

Bases: JournalClient

Journal Client implementation which only decodes the message keys. This does not need to bother with the message deserialization (contrary to swh.journal.client.JournalClient) Message values are still passed unparsed to worker_fn so it can deserialize and use it if needed.

handle_messages(messages, worker_fn)[source]#

Retro-compatible method to expose the worker_fn callback to previous implementations.

This delegates the call super().handle_message_batch which will use internally the self.worker_fn.