Hi

Thanks for the patch.

A possible issue is that the JMSMessageID is only available when the
JMS Client have really sent the message, and some clients can be in an
async mode, where they may take a little while before sending. So in
that case I would assume Camel will have to wait for that to happen.

Unless the Spring Sent callback happens as a sort of pre construct
step, and the JMS client is able to determine the JMSMessageID before
actually sending it.

Anyway its probably different a bit from JMS vendor to vendor. So a
one shoe solution is maybe not possible.

Also a JMS InOnly message, you most likely do not want to have the
Message on the Camel Exchange changed into something else such as a
javax.jms.Message, as you did a fire and forget. So maybe the patch
should just enrich the message by adding a header with the
JMSMessageID value. And I think there should be an option so people
can turn this on|off, based on their needs.

BTW: What is your use case. You need to use the actual JMSMessageID
for track and tracing or some sort?


On Fri, Jan 6, 2012 at 2:18 PM, wing-tung Leung
<wingtung.le...@gmail.com> wrote:
> On Thu, Jan 5, 2012 at 3:21 PM, wing-tung Leung
> <wingtung.le...@gmail.com> wrote:
>> But there is one more thing we would like to do afterwards, and that's
>> capture and log the JMS message ID in some audit table.
>
> I finally patched the Camel JmsProducer class, with a minor
> modification of the "InOnly" behavior. In this case, the actually sent
> JMS message, containing the filled in "JMSMessageID", is copied to the
> "out" from the exchange.
>
> This enables processors further down the line to capture the message
> ID for logging.
>
> Attached the patch. Any comments/ideas to improve this further? Any
> idea if such idea could end up in the trunk? I applied it to version
> 2.6.0, but it can be applied to the current trunk without conflicts as
> well.
>
> Regards,
>
> Tung



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to