ARTEMIS-4820 [1] has been opened for this issue.

Justin

[1] https://issues.apache.org/jira/browse/ARTEMIS-4820

On Mon, Jun 17, 2024 at 4:18 AM Devriendt, Erik
<erik.devrie...@siemens.com.invalid> wrote:

> We stumbled on an issue in Artemis with the handling of the TTL field of
> received AMQP.
> Our Artemis instance has a AMQP broker connection to a IBM MQ broker and
> receives messages forwarded by that IBM MQ broker.
> If the IBM client does not provide a specific TTL for a message, IBM MQ by
> default sets the TTL of the AMQP message to the maximum value.
> Given that AMQP standard TTL is defined as an ‘uint’, that max value is
> 0xFFFFFFFF.
> However, Artemis considers these messages as expired.
> This is probably caused  by the line
> expiration = System.currentTimeMillis() + header.getTtl().intValue();
> in      /protocol/amqp/broker/AMQPMessage.java
>
> The intValue() method returns int value and probably converts 0xFFFFFFFF
> to decimal -1, leading to a expiration value 1 millisecond in the past.
>
> I guess that using the method longValue() instead of intValue() would
> solve the issue.
>
> Kind regards
>
> Erik Devriendt
>

Reply via email to