Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14243

Opentracing with JMS not working when JmsComponent is defined as a Spring bean

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.24.2
    • 3.1.0
    • camel-opentracing
    • None
    • Unknown

    Description

      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.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Serkan80 Serkan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: