You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Hector Veiga (JIRA)" <ji...@apache.org> on 2017/09/19 21:49:00 UTC

[jira] [Updated] (CAMEL-11791) RabbitMQ Producer does not recover if exchange is deleted manually

     [ https://issues.apache.org/jira/browse/CAMEL-11791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hector Veiga updated CAMEL-11791:
---------------------------------
    Description: 
While trying different recovering scenarios with camel-rabbitmq we tried to delete the exchange where the producer was sending RabbitMQ messages to.

We observed that the exchange was never recreated again as well as no new channel were created in the channel pool. Every time a channel was used to send a non-existent exchange, the channel was closed and we got a log saying "Got a closed channel from the pool". Once it ran out of channels in the pool, we keep getting the same exception when a new message tries to be sent to the exchange:

{noformat}
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1174) ~[commons-pool-1.6.jar:1.6]
{noformat}

We are using a InOnly producer and the options we are using are: 
{noformat}
rabbitmq://somehose:someport/some_exchange?username=SomeApp&password=SomeApp&skipQueueDeclare=true&exchangeType=headers&automaticRecoveryEnabled=true&topologyRecoveryEnabled=true
{noformat}

It seems the code never catches a Exception thrown by channel.basicPublish(...) in RabbitMQMessagePublisher. Maybe we could catch if the issue it's that the exchange went away and try to run the declaration again?

  was:
While trying different recovering scenarios with camel-rabbitmq we tried to delete the exchange where the producer was sending RabbitMQ messages to.

We observed that the exchange was never recreated again as well as no new channel were created in the channel pool. Every time a channel was used to send a non-existent exchange, the channel was closed and we got a log saying "Got a closed channel from the pool". Once it ran out of channels in the pool, we keep getting the same exception when a new message tries to be sent to the exchange:

{noformat}
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1174) ~[commons-pool-1.6.jar:1.6]
{noformat}

We are using a InOnly producer and the options we are using are: 
{noformat}
rabbitmq://somehose:someport/some_exchange?username=CollectionsApplication&password=CollectionsApplication&skipQueueDeclare=true&exchangeType=headers&automaticRecoveryEnabled=true&topologyRecoveryEnabled=true
{noformat}

It seems the code never catches a Exception thrown by channel.basicPublish(...) in RabbitMQMessagePublisher. Maybe we could catch if the issue it's that the exchange went away and try to run the declaration again?


> RabbitMQ Producer does not recover if exchange is deleted manually
> ------------------------------------------------------------------
>
>                 Key: CAMEL-11791
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11791
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-rabbitmq
>    Affects Versions: 2.19.2
>            Reporter: Hector Veiga
>
> While trying different recovering scenarios with camel-rabbitmq we tried to delete the exchange where the producer was sending RabbitMQ messages to.
> We observed that the exchange was never recreated again as well as no new channel were created in the channel pool. Every time a channel was used to send a non-existent exchange, the channel was closed and we got a log saying "Got a closed channel from the pool". Once it ran out of channels in the pool, we keep getting the same exception when a new message tries to be sent to the exchange:
> {noformat}
> Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
> at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1174) ~[commons-pool-1.6.jar:1.6]
> {noformat}
> We are using a InOnly producer and the options we are using are: 
> {noformat}
> rabbitmq://somehose:someport/some_exchange?username=SomeApp&password=SomeApp&skipQueueDeclare=true&exchangeType=headers&automaticRecoveryEnabled=true&topologyRecoveryEnabled=true
> {noformat}
> It seems the code never catches a Exception thrown by channel.basicPublish(...) in RabbitMQMessagePublisher. Maybe we could catch if the issue it's that the exchange went away and try to run the declaration again?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)