You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Gordon (Jira)" <ji...@apache.org> on 2022/10/12 12:55:00 UTC
[jira] [Updated] (AMQ-9118) jms consumer may hang if jms.prefetchPolicy.all=0
[ https://issues.apache.org/jira/browse/AMQ-9118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gordon updated AMQ-9118:
------------------------
Attachment: MqTest2.java
> jms consumer may hang if jms.prefetchPolicy.all=0
> --------------------------------------------------
>
> Key: AMQ-9118
> URL: https://issues.apache.org/jira/browse/AMQ-9118
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.16.5
> Reporter: Gordon
> Priority: Major
> Attachments: MqTest2.java
>
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)