You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2010/08/12 22:15:47 UTC

[jira] Created: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

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
    Affects Versions: 1.3.0
            Reporter: Timothy Bish
            Assignee: Jim Gomes
            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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61518#action_61518 ] 

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

Cool, I will have to check that out once I finish what I'm working on right now.  I don't have a TIBCO license so I don't have access to the DLLs, at least being able to compile the project will help a bit.  

> 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.


[jira] Resolved: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQNET-271.
---------------------------------

    Resolution: Fixed

Fixed in trunk for all NMS providers.

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61220#action_61220 ] 

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

Those names are fine.  

As for the JMS Spec discussion, you are right that that portion of Transformation is more internal to each client, although a lot of it could be generic and implemented as an Abstract class in NMS.Util but that's separate from this issue really, just added that as I originally thought that I could use some of the bits from here to help implement it but not really the crux of what I wanted to add in this issue, so just ignore that for now.

This issue is really just an attempt to support the same features as the Java client in regards to Message Transformation, see:
http://activemq.apache.org/message-transformation.html



> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61483#action_61483 ] 

Jim Gomes commented on AMQNET-271:
----------------------------------

Tim, I'm confused as to where the events are.  I thought that we had re-designed it in the above comments so that it was a single delegate variable, which implies a single target for invocation and not a list of targets.  It doesn't need to be an event variable.  Just a delegate variable.

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61516#action_61516 ] 

Jim Gomes commented on AMQNET-271:
----------------------------------

Tim, you should check out a project I created that might help you compile the NMS.EMS project.  You won't be able to actually run it to test it, but you would at least be able to compile it.

http://code.google.com/p/doppleganger/

This source code generator creates a stub assembly to take the place of a real assembly that you may not have, or may not have a license to.  I actually made it specifically for the NMS.EMS project since the TIBCO.EMS.DLL is a commercial product.  However, it should be just fine to link against a proxy of that assembly for testing purposes.

If this is of interest to you, let me know, and I can help you get set up with it.  Like I said, it's only useful for resolving compile-time issues.

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61486#action_61486 ] 

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

Ok, nevermind, I forgot I can expose the delegate as a Property in the Interface, was confused, as I always am when trying to use delegates and events in .NET.


> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61187#action_61187 ] 

Jim Gomes commented on AMQNET-271:
----------------------------------

Instead of a callback interface style of programming, wouldn't it be more .NET-like to use an event driven architecture?  For example:

The IMessageProducer interface would support a PreSendMessageEvent that could be used to register an event handler for processing the message.  Likewise, the IMessageConsumer interface would support a PreDispatchMessageEvent event.  This would make implementations cleaner and simpler, by creating a separation of concerns.  The implementor would not be forced to implement both transforms, since they could create event handlers individually in case they only want to handle pre-dispatch events and don't care about pre-send events.

Just trying to understand this feature a bit more.

> 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.


[jira] Assigned: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQNET-271:
-----------------------------------

    Assignee: Timothy Bish  (was: Jim Gomes)

> 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
>    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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61490#action_61490 ] 

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

Implemented the change in NMS, NMS.ActiveMQ, NMS.Stomp, and NMS.MSMQ.  Can't build NMS.EMS so couldn't do that one.

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61528#action_61528 ] 

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

Ok, the compile seems to work ok, gives me an error about the assembly not having a strong name, but at least I can test out code changes to ensure they compile now.

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61188#action_61188 ] 

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

Events allow for multiple subscribers which you definitely don't want in this case.  Plus I always find the event / delegate model in .NET to be a bit annoying as I have to read a book every time I want to use them.

The purpose of this feature is to allow client to configure a producer or consumer to transform a message into something they understand, for instance a client could use to send say an IStreamMessage which they know a Stomp client is listening on an have the MessageProducer apply the transform on the fly to convert it to a TextMessage encoded in a way the Stomp client can process.  Or it could be used just as a means of content enrichment.  

I don't think that you'd want to multicast that given that each receiver could return their own converted message.  Which one would you end up sending?  

We could of course provide a default implementation that overrides both and return null (null right now in my code just means use the original), then the user can use that to allow them to only implement the transform method they wanted.  Plus this could add some extra code like helpers to copy standard NMS headers etc from the old to the new message.

I had also intended to use this interface to create a generic NMS message Transformer that the client could use to transform NMS messages commands from one client to the command type that's needed in another.  For example, the NMS.ActiveMQ client could accept ITextMessage from a MSMQ client and internally transform it into the NMS.ActiveMQ ITextMessage implementation.  

If there's some slick .NETy way of doing all this then feel free to comment, just make sure it works on the .NETCF 2.0 framework so it can run in NMS.Stomp  :)

Just wanted to get the ball rolling on something so nothing set in stone right now, comment away....

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61482#action_61482 ] 

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

I've implemented a solution locally using delegates for the Producer and Consumer Transformer.   One this I still am not crazy about is that the fact that these are exposed as Events in the NMS interfaces causes the implementations to allow for multiple registrations of transformers which we really don't want, only one would ever actually have its return value used the others would just be unnecessary overhead per invocation.

> 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.


[jira] Issue Comment Edited: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61516#action_61516 ] 

Jim Gomes edited comment on AMQNET-271 at 8/30/10 10:56 AM:
------------------------------------------------------------

Tim, you should check out a project I created that might help you compile the NMS.EMS project.  You won't be able to actually run it to test it, but you would at least be able to compile it.

http://code.google.com/p/doppleganger/

This source code generator creates a stub assembly to take the place of a real assembly that you may not have, or may not have a license to.  I actually made it specifically for the NMS.EMS project since the TIBCO.EMS.DLL is a commercial product.  However, it should be just fine to link against a proxy of that assembly for testing purposes.

Browse to the tags branch, and there is a TIBCO.EMS.cs and TIBCO.EMS.dll proxy stub already generated from the original TIBCO.EMS.DLL file.  You can use these in your build environment.

http://code.google.com/p/doppleganger/source/browse/#svn/tags/TibcoEMS

If this is of interest to you, let me know, and I can help you get set up with it if you have any problems.  Like I said, it's only useful for resolving compile-time issues.

      was (Author: semog):
    Tim, you should check out a project I created that might help you compile the NMS.EMS project.  You won't be able to actually run it to test it, but you would at least be able to compile it.

http://code.google.com/p/doppleganger/

This source code generator creates a stub assembly to take the place of a real assembly that you may not have, or may not have a license to.  I actually made it specifically for the NMS.EMS project since the TIBCO.EMS.DLL is a commercial product.  However, it should be just fine to link against a proxy of that assembly for testing purposes.

If this is of interest to you, let me know, and I can help you get set up with it.  Like I said, it's only useful for resolving compile-time issues.
  
> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61218#action_61218 ] 

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

So would adding sine delegate definitions like these be acceptable?

{noformat}

    /// <summary>
    /// A delegate that a client can register that will be called each time a Producer's send method is
    /// called to allow the client to Transform a sent message from one type to another, StreamMessage to
    /// TextMessage, ObjectMessage to TextMessage containing XML, etc.  This allows a client to create a
    /// producer that will automatically transform a message to a type that some receiving client is
    /// capable of processing or adding additional information to a sent message such as additional message
    /// headers, etc.  For messages that do not need to be processed the client should return null from
    /// this method, in this case the original message will be sent.
    /// </summary>
    public delegate IMessage ProducerTransformer(ISession session, IMessageProducer producer, IMessage message);

    /// <summary>
    /// A delegate that a client can register that will be called each time a consumer dispatches a message
    /// to the client code to allow the client to Transform a received message from one type to another,
    /// StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc.  This allows a
    /// client to create a consumer that will automatically transform a message to a type that the client is
    /// capable of processing or adding additional information to a received message.  For messages that do
    /// not need to be processed the client should return null from this method, in this case the original
    /// message will be dispatched to the client.
    /// </summary>
    public delegate IMessage ConsumerTransformer(ISession session, IMessageConsumer consumer, IMessage message);

{noformat}

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61529#action_61529 ] 

Jim Gomes commented on AMQNET-271:
----------------------------------

Cool.  You can recompile the TIBCO.EMS.cs file and sign it to get rid of that strong name error.  That .cs file was generated from the original TIBCO.EMS.dll version 4.2 using Doppleganger.

BTW, I checked in the TIBCO changes for this issue.  Feel free to review/correct them.

> 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.


[jira] Updated: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQNET-271:
--------------------------------

    Component/s: ActiveMQ
                 EMS
                 MSMQ
                 NMS
                 Stomp

> 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61219#action_61219 ] 

Jim Gomes commented on AMQNET-271:
----------------------------------

Yeah, those look good.  Although, I would change the naming somewhat to ProducerTransformerDelegate and ConsumerTransformerDelegate.  The reason for this is you can have a cleaner name for  the instance variable.  For example:

{code:title=snippet.cs}
interface IMessageConsumer
{
...
   ConsumerTransformerDelegate ConsumerTransformer;
...
}

interface IMessageProducer
{
...
    ProducerTransformerDelegate ProducerTransformer;
...
}
{code}

While I see how the JMS spec is attempting to support a resilient protocol, this change seems to be a departure from the current programming model.  Isn't this something that should be handled internally to the provider implementation itself?  This seems to be exposing a bit of the lower-level message handling up to the application layer.  At what point should the application layer need to deal with message formats?  Wouldn't the application layer just create a message in whatever logical format it needs and then send it?

> 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.