citrusframework / citrusframework/citrus
Wrong timeout value gets printed in logs when (not) receiving JMS messages with citrus
- Dominant language
- Java
- Stars
- 485
- Forks
- 155
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 6
Description
**Citrus Version**
4.10.1
**Expected behavior**
If a JMS message does not arrive within specified timeout, the log message should show the correct timeout.
**Actual behavior**
A default value of 5000ms is always shown, independent from the really used timeout value in receive() call.
**see code of org.citrusframework.jms.endpoint.JmsConsumer**
When creating the MessageTimeoutException, the timeout is taken from the endpoint instead of from jmsTemplate, for which it was previously set and has been used.
The attached patch should fix the issue.
[citrus-jms-receive-timeout-message.patch](https://github.com/user-attachments/files/32074502/citrus-jms-receive-timeout-message.patch)
Contributor guide
Research direction
Start with org.citrusframework.jms.endpoint.JmsConsumer and trace the receive() timeout through jmsTemplate to MessageTimeoutException. Reproduce a JMS receive with a non-default timeout, then verify that the timeout reported in the log matches the value used by the receive call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100