According to the JMS spec, I do not have to specify the message ID when sending.
When I send a message via JMSProducer#send() or when I create a message via the hawt.io console, I can see the message ID being set to some internal sequential number generated by the Artemis broker.
However, when I use MessageConsumer#receive() or MessageListener#onMessage() to receive a Message, Message#getJMSMessageID() always returns null.
The only way I can receive a message with a non-null JMS message ID is by reading a message from a different (IBM) message queue and copying all its properties to the Artemis message before sending it.
I have tested this with both AMQ 7.3.0.GA and Apache ActiveMQ Artemis 2.6.2, with both native (org.apache.activemq.artemis-jms-client) and AMQP (org.apache.qpid.qpid-jms-client) clients.
Is there some configuration I must set on the broker to make it populate JMS message IDs correctly?