Pattern API

@lymph.patterns.serial_events.serial_event(*event_types, partition_count=12, key=None)
Parameters:
  • event_types – event types that should be partitioned
  • partition_count – number of queues that should be used to partition the events
  • key – a function that maps Events to string keys. This function should have two arguments in its signature: the instance of current Interface and instance of the handled Event object.

This event handler redistributes events into partition_count queues. These queues are then partitioned over all service instances and consumed sequentially, i.e. at most one event per queue at a time.