Spring.Messaging.Amqp.Rabbit
MessageListenerAdapter Class
Members  See Also  Send Feedback
Spring.Messaging.Amqp.Rabbit.Listener.Adapter Namespace : MessageListenerAdapter Class
Message listener adapter that delegates the handling of messages to target listener methods via reflection, with flexible message type conversion. Allows listener methods to operate on message content types, completely independent from the Rabbit API.

Object Model




Syntax

C# 
public class MessageListenerAdapter : IMessageListenerIChannelAwareMessageListener  

Remarks

By default, the content of incoming messages gets extracted before being passed into the target listener method, to let the target method operate on message content types such as String or byte array instead of the raw Message. Message type conversion is delegated to a Spring Spring.Messaging.Amqp.Support.Converter.IMessageConverter. By default, a Spring.Messaging.Amqp.Support.Converter.SimpleMessageConverter will be used. (If you do not want such automatic message conversion taking place, then be sure to set the MessageConverter property to

null
.)

If a target listener method returns a non-null object (typically of a message content type such as

String
or byte array), it will get wrapped in a Rabbit
Message
and sent to the exchange of the incoming message with the routing key that comes from the Rabbit ReplyTo property if available or via the DefaultResponseRoutingKey property.

The sending of response messages is only available when using the Spring.Messaging.Amqp.Rabbit.Core.IChannelAwareMessageListener entry point (typically through a Spring message listener container). Usage as a MessageListener does not support the generation of response messages.

Consult the reference documentation for examples of method signatures compliant with this adapter class.

Inheritance Hierarchy

System.Object
   Spring.Messaging.Amqp.Rabbit.Listener.Adapter.MessageListenerAdapter

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2010 All Rights Reserved.