Proposal : camel-rabbitmq : RabbitMQProducer to override EXCHANGE_NAME/ROUTING_KEY headers if bridgeEndpoint

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposal : camel-rabbitmq : RabbitMQProducer to override EXCHANGE_NAME/ROUTING_KEY headers if bridgeEndpoint

Jonathan Schoreels
Hi,

Currently, the camel-rabbitmq endpoints, if set as "bridgeEndpoint",
ignores the following exchange's headers : EXCHANGE_NAME & ROUTING_KEY, but
it keeps the previous headers setted, which leak information about the
origin of the event. For example, if my message comes from Exchange A, I
transform it and send it to Exchange B, the RabbitMQProducer will ignore
the headers set by A but still will send them to B, which could leaks some
internal info of A to the consumer of B.

Wouldn't it be more correct to replace those two headers, if we ignore them
? I can do the pull request, but I would like to discuss the idea before.

See RabbitMQProducer:processInOut and processInOnly for related code.
Reply | Threaded
Open this post in threaded view
|

Re: Proposal : camel-rabbitmq : RabbitMQProducer to override EXCHANGE_NAME/ROUTING_KEY headers if bridgeEndpoint

Omar Al-Safi
Hi,

You are welcome to do so. Please raise a JIRA ticket and then send your PR.

Regards,
Omar

On Mon, Jan 20, 2020 at 4:15 PM Jonathan Schoreels <
[hidden email]> wrote:

> Hi,
>
> Currently, the camel-rabbitmq endpoints, if set as "bridgeEndpoint",
> ignores the following exchange's headers : EXCHANGE_NAME & ROUTING_KEY, but
> it keeps the previous headers setted, which leak information about the
> origin of the event. For example, if my message comes from Exchange A, I
> transform it and send it to Exchange B, the RabbitMQProducer will ignore
> the headers set by A but still will send them to B, which could leaks some
> internal info of A to the consumer of B.
>
> Wouldn't it be more correct to replace those two headers, if we ignore them
> ? I can do the pull request, but I would like to discuss the idea before.
>
> See RabbitMQProducer:processInOut and processInOnly for related code.
>