You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by chiochuan <ch...@gmail.com> on 2015/10/04 06:32:21 UTC

MDC information mess up after sent to activemq endpoint

Hi Guy, 

How to keep data in MDC after sending to JMS/activemq endpoint? 

currently i have 2 bundle whereby 1 bundle is exposing as webservice using
cxf endpoint. For each request, i have generate UUID and set it to MDC for
logging propose and sent the message to activemq endpoint (synchronous
response). 

But when i getting back response from activemq, the transaction show in the
log changes. 

Any idea why cause this?

Thanks.

Regards,
Chio Chuan




--
View this message in context: http://camel.465427.n5.nabble.com/MDC-information-mess-up-after-sent-to-activemq-endpoint-tp5772230.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: MDC information mess up after sent to activemq endpoint

Posted by Greg Autric <ga...@redhat.com>.
Hi 

MDC is also an out of the box option into Camel for several informations [1]
http://camel.apache.org/mdc-logging.html

Greg AUTRIC                        
JBoss Middleware Consultant

email   : gautric __at__ redhat __dot__ com
twitter : @gautric_io

Red Hat Global Services            
Red Hat France SARL                sit: http://www.redhat.fr
Le Linea, 1 rue du General Leclerc, 92047 Paris La Défense Cedex
Sent from webmail

----- Mail original -----
De: "chiochuan" <ch...@gmail.com>
À: users@camel.apache.org
Envoyé: Dimanche 4 Octobre 2015 06:32:21
Objet: MDC information mess up after sent to activemq endpoint

Hi Guy, 

How to keep data in MDC after sending to JMS/activemq endpoint? 

currently i have 2 bundle whereby 1 bundle is exposing as webservice using
cxf endpoint. For each request, i have generate UUID and set it to MDC for
logging propose and sent the message to activemq endpoint (synchronous
response). 

But when i getting back response from activemq, the transaction show in the
log changes. 

Any idea why cause this?

Thanks.

Regards,
Chio Chuan




--
View this message in context: http://camel.465427.n5.nabble.com/MDC-information-mess-up-after-sent-to-activemq-endpoint-tp5772230.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: MDC information mess up after sent to activemq endpoint

Posted by chiochuan <ch...@gmail.com>.
i do set in the jms header to return the transactionID using
interceptSendToEndpoint to activemq:*. 
but still it didnt seem work. 



--
View this message in context: http://camel.465427.n5.nabble.com/MDC-information-mess-up-after-sent-to-activemq-endpoint-tp5772230p5772353.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: MDC information mess up after sent to activemq endpoint

Posted by yogu13 <yo...@gmail.com>.
for response have you configured a JMS listener? A listener runs in a
separate thread and wouldn't have the MDC information which you have set. if
you JMS response has the UUID as part of it then you should reset the MDC
with the value received from JMS.




--
View this message in context: http://camel.465427.n5.nabble.com/MDC-information-mess-up-after-sent-to-activemq-endpoint-tp5772230p5772263.html
Sent from the Camel - Users mailing list archive at Nabble.com.