Create an externally managed queue and populate it with messages (with no service running to consume the messages). The messages are correctly durably saved in the JMS queue for the service.
Now start a service running. There are two issues:
- the messages are not delivered to the service;
- if a client sends a message to the queue then the service is given a single message (and not all the ones on the queue) but then when I look at the message queue (via the AS admin console) the queue is empty (ie all messages have been removed).
I changed the code such that a tpacall with TPNOREPLY set in the flags means that the messages never expire but I am still getting the same behaviour so this is not the reason for the error. Whenever I debug the server then the point at which the queue (in the AS) becomes empty I always see two ServiceDispatcher threads simultaneously trying to drain the destination queue - I'm not sure whether that is a coincidence or not but this is where I'm up to with the issue so far.