activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Gomes (JIRA)" <>
Subject [jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API
Date Mon, 16 Aug 2010 20:04:47 GMT


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:

interface IMessageConsumer
   ConsumerTransformerDelegate ConsumerTransformer;

interface IMessageProducer
    ProducerTransformerDelegate ProducerTransformer;

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:
>             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
>         /// 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
>         /// <summary>
>         /// Called from an IMessageConsumer prior to dispatching the message to the client
>         /// 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
>         /// </summary>
>         IMessage ConsumerTransform(ISession session, IMessageConsumer producer, IMessage
>     }
> {noformat}

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

View raw message