activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <jira+amq...@apache.org>
Subject [jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API
Date Mon, 16 Aug 2010 18:06:47 GMT

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


Mime
View raw message