Spring Integration

org.springframework.integration.redis.outbound
Class RedisPublishingMessageHandler

java.lang.Object
  extended by org.springframework.integration.redis.outbound.RedisPublishingMessageHandler
All Implemented Interfaces:
MessageHandler

public class RedisPublishingMessageHandler
extends java.lang.Object
implements MessageHandler

Since:
2.1
Author:
Mark Fisher

Constructor Summary
RedisPublishingMessageHandler(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
           
 
Method Summary
 void handleMessage(Message<?> message)
          Handles the message if possible.
 void setDefaultTopic(java.lang.String defaultTopic)
           
 void setMessageConverter(MessageConverter messageConverter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedisPublishingMessageHandler

public RedisPublishingMessageHandler(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
Method Detail

setMessageConverter

public void setMessageConverter(MessageConverter messageConverter)

setDefaultTopic

public void setDefaultTopic(java.lang.String defaultTopic)

handleMessage

public void handleMessage(Message<?> message)
                   throws MessagingException
Description copied from interface: MessageHandler
Handles the message if possible. If the handler cannot deal with the message this will result in a 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.

Specified by:
handleMessage in interface MessageHandler
Parameters:
message - the message to be handled
Throws:
MessageRejectedException - if the handler doesn't accept the message
MessageHandlingException - when something fails during the handling
MessageDeliveryException - when this handler failed to deliver the reply related to the handling of the message
MessagingException

Spring Integration