Interface ChannelAwareMessageListener
- All Superinterfaces:
MessageListener
- All Known Subinterfaces:
ChannelAwareBatchMessageListener
- All Known Implementing Classes:
AbstractAdaptableMessageListener
,AsyncRabbitTemplate
,BatchingRabbitTemplate
,BatchMessagingMessageListenerAdapter
,MessageListenerAdapter
,MessagingMessageListenerAdapter
,RabbitTemplate
,StreamMessageListenerAdapter
,TestRabbitTemplate
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A message listener that is aware of the Channel on which the message was received.
- Author:
- Mark Pollack, Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Delivers a single message.void
Callback for processing a received Rabbit message.default void
onMessageBatch
(List<Message> messages, com.rabbitmq.client.Channel channel) Methods inherited from interface org.springframework.amqp.core.MessageListener
containerAckMode, isAsyncReplies, onMessageBatch
-
Method Details
-
onMessage
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 (nevernull
)channel
- the underlying Rabbit Channel (nevernull
unless called by the stream listener container).- Throws:
Exception
- Any.
-
onMessage
Description copied from interface:MessageListener
Delivers a single message.- Specified by:
onMessage
in interfaceMessageListener
- Parameters:
message
- the message.
-
onMessageBatch
-