Class PublishSubscribeChannel

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, BroadcastCapableChannel, ExecutorChannelInterceptorAware, ExpressionCapable, IntegrationPattern, NamedComponent, IntegrationManagement, SubscribableChannelManagement, TrackableComponent, MessageChannel, SubscribableChannel, InterceptableChannel

public class PublishSubscribeChannel
extends AbstractExecutorChannel
implements BroadcastCapableChannel
A channel that sends Messages to each of its subscribers.
Author:
Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan, Trung Pham
  • Constructor Details

    • PublishSubscribeChannel

      public PublishSubscribeChannel()
      Create a PublishSubscribeChannel that will invoke the handlers in the message sender's thread.
    • PublishSubscribeChannel

      public PublishSubscribeChannel​(boolean requireSubscribers)
      Create a PublishSubscribeChannel that will invoke the handlers in the message sender's thread considering the provided requireSubscribers flag.
      Parameters:
      requireSubscribers - if set to true, the sent message is considered as non-dispatched and rejected to the caller with the "Dispatcher has no subscribers".
      Since:
      5.4.3
    • PublishSubscribeChannel

      public PublishSubscribeChannel​(@Nullable Executor executor)
      Create a PublishSubscribeChannel that will use an Executor to invoke the handlers. If this is null, each invocation will occur in the message sender's thread.
      Parameters:
      executor - The executor.
    • PublishSubscribeChannel

      public PublishSubscribeChannel​(@Nullable Executor executor, boolean requireSubscribers)
      Create a PublishSubscribeChannel that will use an Executor to invoke the handlers. If this is null, each invocation will occur in the message sender's thread.
      Parameters:
      executor - The executor.
      requireSubscribers - if set to true, the sent message is considered as non-dispatched and rejected to the caller with the "Dispatcher has no subscribers".
      Since:
      5.4.3
  • Method Details