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 voidDelivers a single message.voidCallback for processing a received Rabbit message.default voidonMessageBatch(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 (nevernullunless called by the stream listener container).- Throws:
Exception- Any.
-
onMessage
Description copied from interface:MessageListenerDelivers a single message.- Specified by:
onMessagein interfaceMessageListener- Parameters:
message- the message.
-
onMessageBatch
-