Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 18278 invoked from network); 16 Aug 2010 20:05:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Aug 2010 20:05:10 -0000 Received: (qmail 74798 invoked by uid 500); 16 Aug 2010 20:05:10 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 74750 invoked by uid 500); 16 Aug 2010 20:05:09 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 74738 invoked by uid 99); 16 Aug 2010 20:05:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Aug 2010 20:05:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Aug 2010 20:05:08 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7GK4lbG020311 for ; Mon, 16 Aug 2010 20:04:47 GMT Message-ID: <26275157.7801281989087615.JavaMail.jira@thor> Date: Mon, 16 Aug 2010 16:04:47 -0400 (EDT) From: "Jim Gomes (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQNET-271) Add support for a Message Transformer to be set in NMS API In-Reply-To: <27404014.6521281644147298.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ 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} > /// > /// Interface for a class that can Transform a Message from one type to another either > /// before consumption or before sent by a producer. > /// > public interface IMessageTransformer > { > /// > /// 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. > /// > IMessage ProducerTransform(ISession session, IMessageProducer producer, IMessage message); > /// > /// 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. > /// > 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.