Most of the time pending messages on a queue means nobody is listening but there are more obscure reasons.
Checklist Pending messages:
Is the queue part of Request Response pattern?
set time to live on message in sending application (quick fix set time to live on queue)
Are there no listeners/receivers on the queue?
(re)start component providing the service
is prefetch set to 5? You will see messages on the queue but you cannot open them on the queue, number of pending messages a multiplication of 5
make sure prefetch is set to none (-1)
stop incoming messages.
stop component providing the service.
(retrieve and) purge messages.
restart provider and consumer application
AD3 Why and When is prefetch 5 a problem?
Prefetch mechanism does only work in combination with AUTO Acknowledge, Using transactional processing or Client Acknowledge will lead to unwanted behavior.
The consuming application takes 5 messages from the queue and starts processing, the moment one of the messages fails all 5 are returned to the queue. When using client Ack these 5 messages will be processed again, one will fail againg and messages will be put back on the queue again till max retries value is reached. I once send 5000 SMS messages to the testers mobile phone, in this case max retries was not set and I used Client Ack?
In combination with transactional processing in IBIS the transaction will hang and the five messages will be released to the queue when the transaction manager is stopped.