Interface ChannelAwareMessageListener

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void onMessage​(org.springframework.amqp.core.Message message)  
      void onMessage​(org.springframework.amqp.core.Message message, com.rabbitmq.client.Channel channel)
      Callback for processing a received Rabbit message.
      default void onMessageBatch​(java.util.List<org.springframework.amqp.core.Message> messages, com.rabbitmq.client.Channel channel)  
      • Methods inherited from interface org.springframework.amqp.core.MessageListener

        containerAckMode, isAsyncReplies, onMessageBatch
    • Method Detail

      • onMessage

        void onMessage​(org.springframework.amqp.core.Message message,
                       @Nullable
                       com.rabbitmq.client.Channel channel)
                throws java.lang.Exception
        Callback for processing a received Rabbit message.

        Implementors are supposed to process the given Message, typically sending reply messages through the given Session.

        Parameters:
        message - the received AMQP message (never null)
        channel - the underlying Rabbit Channel (never null unless called by the stream listener container).
        Throws:
        java.lang.Exception - Any.
      • onMessage

        default void onMessage​(org.springframework.amqp.core.Message message)
        Specified by:
        onMessage in interface org.springframework.amqp.core.MessageListener
      • onMessageBatch

        default void onMessageBatch​(java.util.List<org.springframework.amqp.core.Message> messages,
                                    com.rabbitmq.client.Channel channel)