public interface MessageHandler
| Modifier and Type | Method and Description |
|---|---|
void |
handleMessage(Message<?> message)
Handles the message if possible.
|
void handleMessage(Message<?> message) throws MessagingException
MessageRejectedException e.g.
in case of a Selective Consumer. When a consumer tries to handle a
message, but fails to do so, a MessageHandlingException is
thrown. In the last case it is recommended to treat the message as tainted
and go into an error scenario.
When the handling results in a failure of another message being sent
(e.g. a "reply" message), that failure will trigger a
MessageDeliveryException.
message - the message to be handledMessageRejectedException - if the handler doesn't accept the messageMessageHandlingException - when something fails during the handlingMessageDeliveryException - when this handler failed to deliver the
reply related to the handling of the messageMessagingException