Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-271

Add support for a Message Transformer to be set in NMS API

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • ActiveMQ, EMS, MSMQ, NMS, Stomp
    • None

    Description

      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:

          /// <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);
          }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tabish Timothy A. Bish
            tabish Timothy A. Bish
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment