Details
Description
I'm utilizing the camel-rabbitmq component to send messages to RabbitMQ with a specified timeout. However, I've observed that the timeout response is delayed. Upon debugging the Camel code (https://github.com/apache/camel/blob/camel-3.21.x/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/reply/ReplyManagerSupport.java#L217), I discovered that this delay is caused by a specific line of code that performs a get operation on a map. This map internally uses a ReentrantLock, which is contributing to the delay. I think it is not a bug, but I think it can be improved. I propose developing a 'contains' method that operates without the need for locking. I'm trying to reproduce it outside my application and inside a simple POC.
Attachments
Issue Links
- links to