Serkan created CAMEL-14243:
------------------------------

             Summary: Opentracing with JMS not working when JmsComponent is 
defined as a Spring bean
                 Key: CAMEL-14243
                 URL: https://issues.apache.org/jira/browse/CAMEL-14243
             Project: Camel
          Issue Type: Bug
          Components: camel-opentracing
    Affects Versions: 2.24.2
            Reporter: Serkan


see also:

[https://github.com/opentracing/opentracing-java/issues/307#issuecomment-560329283]

 

I'm using the following libraries:

-JDK 8

-camel 2.24.2

---camel-jms-2.24.2

-camel-opentracing 2.24.2

-jaeger-client-0.34.0

 

Issue:

-Define JmsComponent as a Spring bean:

@Bean(name = "core-jms")
public JmsComponent createJmsComponentBean(
 @Qualifier(value = "core-jmsConnectionFactory") ConnectionFactory 
connectionFactory) throws JMSException {
 JmsComponent jmsComponent = new JmsComponent();
 JmsConfiguration jmsConfiguration = new JmsConfiguration(connectionFactory);
 jmsConfiguration.setJmsMessageType(JmsMessageType.Text);
 jmsConfiguration.setUseMessageIDAsCorrelationID(true);
 jmsComponent.setConfiguration(jmsConfiguration);

 return jmsComponent;
}

If you use this JmsComponent in your route (like: from("core-jms://...) then 
the protocol name change from jms:// into core-jms:// and the current 
registered SpanDecorators wont match with this one. What will result into wrong 
tracing id's among the whole flow.

Thus let's say we have the following situation:

Route A -> Jms Queue -> Route B -> WS call.

What I expect is that Route A and Route B have the same traceId, but what I get 
is 2 traces:

one for Route A -> Jms Queue, and another one from Jms Queue -> Route B.

 

See also the discussion in the link above for more info.

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to