Class LoadBalancingChannelSpec<S extends MessageChannelSpec<S,C>,C extends AbstractMessageChannel>

Type Parameters:
S - the target LoadBalancingChannelSpec implementation type.
C - the target AbstractMessageChannel implementation type.
All Implemented Interfaces:
DisposableBean, FactoryBean<C>, InitializingBean, Lifecycle, Phased, SmartLifecycle, ComponentsRegistration
Direct Known Subclasses:
DirectChannelSpec, ExecutorChannelSpec, PartitionedChannelSpec

public abstract class LoadBalancingChannelSpec<S extends MessageChannelSpec<S,C>,C extends AbstractMessageChannel> extends MessageChannelSpec<S,C>
Since:
5.0
Author:
Artem Bilan
  • Field Details

  • Constructor Details

    • LoadBalancingChannelSpec

      protected LoadBalancingChannelSpec()
  • Method Details

    • loadBalancer

      public S loadBalancer(LoadBalancingStrategy loadBalancingStrategyToSet)
    • failover

      public S failover(boolean failoverToSet)
    • failoverStrategy

      public S failoverStrategy(Predicate<Exception> failoverStrategy)
      Configure a strategy whether the channel's dispatcher should have failover enabled for the exception thrown. Overrides failover(boolean) option. In other words: or this, or that option has to be set.
      Parameters:
      failoverStrategy - The failover boolean.
      Since:
      6.3
    • maxSubscribers

      public S maxSubscribers(Integer maxSubscribersToSet)