[ 
https://issues.apache.org/jira/browse/CAMEL-9561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15155480#comment-15155480
 ] 

Claus Ibsen commented on CAMEL-9561:
------------------------------------

To support this we would possible need to create a reply manager per dynamic 
exchange name, which potentially could lead to a lot if using many different 
exchange names.

Also there should maybe be a way to tell if the reply manager should be 
discarded afterwards if the exchange name was only to be used once. But if 
there is a lot more in the future using same exchange name then you may want to 
reuse the same reply manager.

This adds another dimension on top of the existing reply manager support.

> RabbitMQ InOut Producer generates operation not permitted on the default 
> exchange when using dynamic exchange
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9561
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9561
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-rabbitmq
>    Affects Versions: 2.16.2
>            Reporter: Arnaud CHOTARD
>             Fix For: Future
>
>
> The use case uses a RabbitMQ InOut Producer with a dynamic RabbitMQ exchange 
> name header :
> {code}
> from("direct:route")
>    .setHeader(RabbitMQConstants.EXCHANGE_NAME, constant("exchange"))
>    .inOut("rabbitmq:///?connectionFactory=...")
> {code}
> The exchange name is only set on header, not in RabbitMQ endpoint URI.
> This generates a RabbitMQ Exception :
> {code}
> com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: 
> #method<channel.close>(reply-code=403, reply-text=ACCESS_REFUSED - operation 
> not permitted on the default exchange, class-id=50, method-id=20)
> {code}
> The problem is located when doing queueBinding on reply to queue in 
> org.apache.camel.component.rabbitmq.reply.TemporaryQueueReplyManager
> {code}
> protected Connection createListenerContainer() throws Exception
> {code}
> {code}
> channel.queueBind(getReplyTo(), endpoint.getExchangeName(), getReplyTo());
> {code}
> The header exchange name should be used instead of the endpoint exchange name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to