Rhuan Rocha created CAMEL-20590:
-----------------------------------

             Summary: Delay to execute timeout to Camel RabbitMQ (InOut)
                 Key: CAMEL-20590
                 URL: https://issues.apache.org/jira/browse/CAMEL-20590
             Project: Camel
          Issue Type: Improvement
          Components: camel-rabbitmq
    Affects Versions: 3.21.0, 3.20.0
            Reporter: Rhuan Rocha


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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to