Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.16.5
-
None
-
None
Description
I have an activemq broker using jdbc datasource and client application using failover tcp connection with parameter jms.prefetchPolicy.all=0. If connection to database is not stable, client may hang indefinitely.
This happens in this scenario:
- There is a jms connection using failover tcp transport. Session is using CLIENT_ACKNOWLEDGE.
- Jms consumer calls receive - it sends pull message request to the broker.
- broker sends message to the consumer.
- client application starts processing of the message.
- network failure, broker looses connection to the database.
- broker stops tcp transport.
- client application finish processing of the message, but jms consumer fails to acknowledge message because broker is not available.
- network restores, broker restarts tcp transport.
- jms consumer restores connection to the broker and sends pull message request.
- Broker sends the SAME message to the consumer because it was not acknowledged.
- ActiveMQMessageConsumer detects message as duplicate and DROPS it, writing "suppressing duplicate delivery on connection, poison acking: MessageDispatch" in the log.
- consumer continue to wait a message. It hangs forever.
This issue happens when jms.prefetchPolicy.all=0 - when client pulls messages from the broker instead of the broker pushing them to the client.