Class ContainerGroupSequencer

java.lang.Object
org.springframework.kafka.listener.ContainerGroupSequencer
All Implemented Interfaces:
EventListener, Aware, ApplicationContextAware, ApplicationListener<ListenerContainerIdleEvent>, Lifecycle, Phased, SmartLifecycle

public class ContainerGroupSequencer extends Object implements ApplicationContextAware, ApplicationListener<ListenerContainerIdleEvent>, SmartLifecycle
Sequence the starting of container groups when all containers in the previous group are idle.
Since:
2.7.3
Author:
Gary Russell
  • Constructor Details

    • ContainerGroupSequencer

      public ContainerGroupSequencer(ListenerContainerRegistry registry, long defaultIdleEventInterval, String... containerGroups)
      Set containers in each group to not auto start. Start the containers in the first group. Start containers in group[n] when all containers in group[n-1] are idle; stop the containers in group[n-1].
      Parameters:
      registry - the registry.
      defaultIdleEventInterval - the idle event interval if not already set.
      containerGroups - The list of container groups, in order.
  • Method Details