You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Arnaud CHOTARD (JIRA)" <ji...@apache.org> on 2016/02/02 16:29:39 UTC

[jira] [Created] (CAMEL-9561) RabbitMQ InOut Producer generates operation not permitted on the default exchange when using dynamic exchange

Arnaud CHOTARD created CAMEL-9561:
-------------------------------------

             Summary: 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: Bug
          Components: camel-rabbitmq
    Affects Versions: 2.16.2
            Reporter: Arnaud CHOTARD


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)