Camel
  1. Camel
  2. CAMEL-6809

rabbitmq.EXCHANGE_NAME header used in preference to uri exchange name

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.12.0
    • Fix Version/s: 2.12.3, 2.13.0
    • Component/s: camel-rabbitmq
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      RabbitMQProducer.process method uses the existing rabbitmq.EXCHANGE_NAME header in preference to the exchange name that is part of the endpoint uri. This means that when consuming off one exchange and producing onto another, the rabbitmq.EXCHANGE_NAME needs to be explicitally removed, otherwise the messages will not be sent to the exchange name defined in the destinition uri.

      The exchange name is a required part of the endpoint uri.
      http://camel.apache.org/rabbitmq.html, so would it be better to ignore the header completely in the RabbitMQProducer? At least then the messages would go where you were expecting them to.

      Happy to submit a pull request on Github if that helps.

        Activity

        Hide
        Christian Müller added a comment -

        Yeah, we love contributions. And of course you can send a pull request via GitHub.

        Show
        Christian Müller added a comment - Yeah, we love contributions. And of course you can send a pull request via GitHub.
        Hide
        Fergus Nelson added a comment -
        Show
        Fergus Nelson added a comment - Pull request submitted. https://github.com/apache/camel/pull/47
        Hide
        Willem Jiang added a comment -

        In Camel the message header can override the setting of the endpoint, if you want to build a proxy, I think we could add an option bridgeEndpoint in camel-rabbitmq endpoint to let the producer ignore the header setting as we do in camel-http.

        Show
        Willem Jiang added a comment - In Camel the message header can override the setting of the endpoint, if you want to build a proxy, I think we could add an option bridgeEndpoint in camel-rabbitmq endpoint to let the producer ignore the header setting as we do in camel-http.
        Hide
        Willem Jiang added a comment -

        Added bridgeEndpoint option to ignore the rabbitmq.EXCHANGE_NAME header.
        Applied the patch into trunk and camel-2.12.x branches.

        Show
        Willem Jiang added a comment - Added bridgeEndpoint option to ignore the rabbitmq.EXCHANGE_NAME header. Applied the patch into trunk and camel-2.12.x branches.
        Hide
        ASF GitHub Bot added a comment -

        Github user jfarrell closed the pull request at:

        https://github.com/apache/camel/pull/47

        Show
        ASF GitHub Bot added a comment - Github user jfarrell closed the pull request at: https://github.com/apache/camel/pull/47

          People

          • Assignee:
            Willem Jiang
            Reporter:
            Fergus Nelson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development