Today we had an issue with persistent messages on IBM MQ for the second time.
The first was about two years ago. The default setting on our queues is persistent and the code we once wrote (and use over and over again) didn't set the persistence of the message. The default value is non-persistent, but we thought the queue setting would override this default. Turns out it didn't. Since that time we set the persistence of our messages.
Today I learned from one of my colleagues that his application didn't receive an answer. Turns out that the expiry time also matters. If a persistent message expires, it we be thrown away. So, besides setting the persistence, also set the expiry time: Expiry == MQC.MQEI_UNLIMITED; (the value of MQC.MQEI_UNLIMITED is -1).