[ 
https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61192#action_61192
 ] 

Timothy Bish commented on AMQNET-271:
-------------------------------------

Ultimately I wanted to try and meet this bit of the JMS API in the NMS client 
libraries, although I was going to get to this in another issue.  I figured 
some of what we did here would be reusable in this context as well.

{quote}
*Provider Implementations of JMS Message Interfaces*

The JMS API provides a set of message interfaces that define the JMS message 
model. It does not provide implementations of these interfaces.

Each JMS provider supplies a set of message factories with its Session object 
for creating instances of messages. This allows a provider to use message 
implementations tailored to its specific needs.

A provider must be prepared to accept message implementations that are not its 
own. They may not be handled as efficiently as its own implementation; however, 
they must be handled.

Note the following exception case when a provider is handling a foreign message 
implementation. If the foreign message implementation contains a JMSReplyTo 
header field that is set to a foreign destination implementation, the provider 
is not required to handle or preserve the value of this header field. 
{quote}

> Add support for a Message Transformer to be set in NMS API
> ----------------------------------------------------------
>
>                 Key: AMQNET-271
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-271
>             Project: ActiveMQ .Net
>          Issue Type: Improvement
>          Components: ActiveMQ, EMS, MSMQ, NMS, Stomp
>    Affects Versions: 1.3.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> Add support in the NMS API for users to set an custom MessageTransformer on 
> the NMS object: 
> IConnectionFactory
> IConnection
> ISession
> IMessageProducer
> IMessageConsumer
> The transformer would be an instance of IMessageTransformer which provides 
> two methods:
> {noformat}
>     /// <summary>
>     /// Interface for a class that can Transform a Message from one type to 
> another either
>     /// before consumption or before sent by a producer.
>     /// </summary>
>     public interface IMessageTransformer
>     {
>         /// <summary>
>         /// Called from an IMessageProducer prior to sending the IMessage, 
> allows the client
>         /// to perform a transformation on the Message prior to it being 
> sent.  This allows a
>         /// client to configure a single Producer to convert a Message to a 
> format that can be
>         /// processed by a specific receiving client.
>         /// </summary>
>         IMessage ProducerTransform(ISession session, IMessageProducer 
> producer, IMessage message);
>         /// <summary>
>         /// Called from an IMessageConsumer prior to dispatching the message 
> to the client either
>         /// by the 'Receive' methods or from the async listener event.  
> Allows the client to perform
>         /// message pre-processing before some messages are dispatched into 
> the client code.
>         /// </summary>
>         IMessage ConsumerTransform(ISession session, IMessageConsumer 
> producer, IMessage message);
>     }
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to