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