Interface MessagingChannelProcessor

All Known Implementing Classes:
MessagingLivenessCheck, MessagingReadinessCheck

public interface MessagingChannelProcessor
Application scoped bean implementing MessagingChannelProcessor can peek on reactive events in the messaging channel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default priority for channel processor.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Optional<String>
    Messaging channel name associated with this processor.
    default Message<?>
    map(String channelName, Message<?> message)
    Map messages going through the onNext signal in the messaging channel.
    default void
    onCancel(String channelName)
    Listener for the cancel coming from the downstream.
    default void
    onComplete(String channelName)
    Listener for the onComplete signal coming from the upstream.
    default void
    onError(String channelName, Throwable t)
    Listener for the onError event coming from the upstream.
    default void
    onInit(String channelName)
    Listener for the initial event before actual subscribing.
    default void
    onRequest(String channelName, long req)
    Listener for the request coming from the downstream.
    default void
    onSubscribe(String channelName, Subscriber<Message<?>> subscriber, Subscription subscription)
    Listener for the onSubscribe signal coming from the upstream.
  • Field Details

    • DEFAULT_PRIORITY

      static final int DEFAULT_PRIORITY
      Default priority for channel processor.
      See Also:
  • Method Details

    • map

      default Message<?> map(String channelName, Message<?> message)
      Map messages going through the onNext signal in the messaging channel.
      Parameters:
      channelName - name of the messaging channel
      message - message coming from the upstream
      Returns:
      mapped message to be delivered to the downstream
    • onError

      default void onError(String channelName, Throwable t)
      Listener for the onError event coming from the upstream.
      Parameters:
      channelName - name of the messaging channel
      t - error causing the onError signal
    • onRequest

      default void onRequest(String channelName, long req)
      Listener for the request coming from the downstream.
      Parameters:
      channelName - name of the messaging channel
      req - number of items requested by the downstream
    • onCancel

      default void onCancel(String channelName)
      Listener for the cancel coming from the downstream.
      Parameters:
      channelName - name of the messaging channel
    • onComplete

      default void onComplete(String channelName)
      Listener for the onComplete signal coming from the upstream.
      Parameters:
      channelName - name of the messaging channel
    • onSubscribe

      default void onSubscribe(String channelName, Subscriber<Message<?>> subscriber, Subscription subscription)
      Listener for the onSubscribe signal coming from the upstream.
      Parameters:
      channelName - name of the messaging channel
      subscriber - subscriber causing this onSubscribe signal
      subscription - assigned subscription
    • onInit

      default void onInit(String channelName)
      Listener for the initial event before actual subscribing.
      Parameters:
      channelName - name of the messaging channel
    • channelName

      default Optional<String> channelName()
      Messaging channel name associated with this processor. If the channel name is empty this processor is applied to the all channels.
      Returns:
      Channel name or empty for all channels