Interface ChannelAwareBatchMessageListener

All Superinterfaces:
ChannelAwareMessageListener, org.springframework.amqp.core.MessageListener
All Known Implementing Classes:
BatchMessagingMessageListenerAdapter

public interface ChannelAwareBatchMessageListener extends ChannelAwareMessageListener
Used to receive a batch of messages if the container supports it.
Since:
2.2
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onMessage(org.springframework.amqp.core.Message message, com.rabbitmq.client.Channel channel)
    Callback for processing a received Rabbit message.
    void
    onMessageBatch(List<org.springframework.amqp.core.Message> messages, com.rabbitmq.client.Channel channel)
     

    Methods inherited from interface org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener

    onMessage

    Methods inherited from interface org.springframework.amqp.core.MessageListener

    containerAckMode, isAsyncReplies, onMessageBatch
  • Method Details

    • onMessage

      default void onMessage(org.springframework.amqp.core.Message message, com.rabbitmq.client.Channel channel) throws Exception
      Description copied from interface: ChannelAwareMessageListener
      Callback for processing a received Rabbit message.

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

      Specified by:
      onMessage in interface ChannelAwareMessageListener
      Parameters:
      message - the received AMQP message (never null)
      channel - the underlying Rabbit Channel (never null unless called by the stream listener container).
      Throws:
      Exception - Any.
    • onMessageBatch

      void onMessageBatch(List<org.springframework.amqp.core.Message> messages, com.rabbitmq.client.Channel channel)
      Specified by:
      onMessageBatch in interface ChannelAwareMessageListener