Alieksiei Illarionov created AMQ-8972:
-----------------------------------------
Summary: Message received twice from Queue after network failure
Key: AMQ-8972
URL: https://issues.apache.org/jira/browse/AMQ-8972
Project: ActiveMQ
Issue Type: Bug
Affects Versions: 5.16.1
Reporter: Alieksiei Illarionov
Attachments: All stacktraces at that time.txt, Disposed due to prior
exception.txt, Local JMS transaction failed to commit.txt, Transaction
completion in doubt due to failover.txt, activemq.xml, activemq1.log,
activemq2.log, context.xml
1. Client application reads a message from queue at
2022-06-06T16:21:57.489+03:00 with
JMSMessageID="ID:ib-lan-50345-1653922011921-3:1:14962:1:4845". ID in our system
is DocId=0181392d-30ca-1ee9-b854-eb2e24fd3afb.
2. Global network failure occurs, the connection is restored at 2022-06-06
16:22:17.394
3. Client received again the same message with the same JMSMessageID at
2022-06-06T16:22:18.834+03:00.
The same happened for two more messages from the same queue during that time,
though we didn't save their JMSMessageIDs:
* DocId=0181392d-3463-1c03-aa3c-e6d64f2eca14, first received at
2022-06-06T16:21:59+03:00, then at 2022-06-06T16:22:19+03:00
* DocId=0181392d-2667-1ef5-8026-b3cb6c36f795, first received at
2022-06-06T16:21:59+03:00, then at 2022-06-06T16:22:18+03:00
Desired behaviour: JMS server should send each message once.
This bug is not reproducible with unit tests.
There are no stacktraces related directly to
JMSMessageID="ID:ib-lan-50345-1653922011921-3:1:14962:1:4845".
We are attaching possible related stacktraces and data.
Stacktraces at our system:
- [^Transaction completion in doubt due to failover.txt]
- [^Disposed due to prior exception.txt]
- [^Local JMS transaction failed to commit.txt]
- [^All stacktraces at that time.txt]
We have two ActiveMQ servers:
- Apache ActiveMQ 5.16.1 (10.77.2.86, ID:BK-TIR1-60751-1649928503277-0:2)
- Apache ActiveMQ 5.16.1 (10.77.0.165, ID:BK-TIR-61562-1649919113311-0:1)
Both are configured like this: [^activemq.xml]
Logs for BK-TIR1 [^activemq1.log] - there are stackstraces there
Logs for BK-TIR [^activemq2.log] - no stackstraces there, unfortunately
Client Connection Factory is configured like this, for failover:
{noformat}
<Resource auth="Container"
name="sbns/TIR"
type="org.apache.activemq.pool.PooledConnectionFactory"
description="TIR JMS Connection Factory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="failover:(tcp://bk-tir:61617,tcp://bk-tir1:61617)?jms.prefetchPolicy.all=1&jms.optimizeAcknowledge=true"
brokerName="MyActiveMQBroker"
userName="..."
password="..."/>
{noformat}
Tomcat's context.xml: [^context.xml]
There are activemq-client-5.16.1.jar and the other dependent jar files (all
with version 5.16.1) in Tomcat's lib directory.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)