Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6400

OriginalDestinationPropagateStrategy fails if original JMSmessage is not from ActiveMQ

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 5.14.0
    • 5.14.1, 5.15.0
    • Camel
    • None

    Description

      When using the Camel ActiveMQComponent, if a message originated as a JMS message that did not come from ActiveMQ but is being sent to an ActiveMQ endpoint, then a ClassCastException will occur.

      java.lang.ClassCastException: org.apache.qpid.client.message.JMSObjectMessage cannot be cast to org.apache.activemq.command.ActiveMQMessage
              at org.apache.activemq.camel.component.OriginalDestinationPropagateStrategy.onMessageCreated(OriginalDestinationPropagateStrategy.java:44)
              at org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:309)
      

      Adding to the instanceof if block could prevent this issue.

      if (message instanceof ActiveMQMessage && jms instanceof ActiveMQMessage) {
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            knt07 Kevin Tate
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: