Use AMQ 6 Swissarmy knife (well there is a bug in src/ProducerTool.java and need to increase Heap in build.xml)
src/ProducerTool.java
from
156 for (int i = 0; i < messageCount || messageCount == 0; i++) {
157
to
156 for (int i = 1; i <= messageCount || messageCount == 0; i++) {
157
vi build.xml
212 <echo>Running consumer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
213 <java classname="ConsumerTool" fork="yes" maxmemory="1000M">
240 <echo>Running producer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
241 <java classname="ProducerTool" fork="yes" maxmemory="1000M">
ant producer -Durl=tcp://localhost:61616 -Duser=admin -Dpassword=admin -Dsubject=TEST -DmessageSize=102400 -Dbatch=100 -Dtransacted=true
– Check hawtio with 2000 message in the queue
ant consumer -Durl=tcp://localhost:61616 -Duser=admin -Dpassword=admin -Dsubject=TEST -Dbatch=100 -Dtransacted=true -Dverbose=true
[java] [Thread-1] Received: 'Message: 295 sent at: Wed Feb 08 10:59:37 HKT 2023...' (length 102400)
[java] [Thread-1] Received: 'Message: 296 sent at: Wed Feb 08 10:59:37 HKT 2023...' (length 102400)
[java] [Thread-1] Received: 'Message: 297 sent at: Wed Feb 08 10:59:37 HKT 2023...' (length 102400)
[java] [Thread-1] Received: 'Message: 298 sent at: Wed Feb 08 10:59:37 HKT 2023...' (length 102400)
[java] [Thread-1] Received: 'Message: 299 sent at: Wed Feb 08 10:59:37 HKT 2023...' (length 102400)
[java] [Thread-1] Received: 'Message: 300 sent at: Wed Feb 08 10:59:37 HKT 2023...' (length 102400)
[java] Commiting transaction for last 100 messages; messages so far = 300
and the ack is lost and the broker is waiting for acknowledgement.
In hawtio (webconsole) it shows the broker is delivering 1000 messages (inflight).
------
Or use the customer provided test:
[INFO] commit failed for transaction TX:ID:PCAZRW01343-62158-1675438721214-1:1:15
javax.jms.JMSException: Disposed due to prior exception
at org.apache.activemq.util.JMSExceptionSupport.createserver-out:2023-02-03 16:38:48,753 WARN [org.apache.activemq.artemis.core.client] AMQ212037: Connection failure to /127.0.0.1:62159 has been detected: An established connection was aborted by the software in your host machine [code=GENERIC_EXCEPTION]
(JMSExceptionSupport.java:54)
at org.apache.activemq.ActiveMQConnection.syncSendPacket (ActiveMQConnection.java:1396)
at org.apache.activemq.ActiveMQConnection.syncSendPacket (ActiveMQConnection.java:1423)
at org.apache.activemq.TransactionContext.commit (TransactionContext.java:342)
at org.apache.activemq.ActiveMQSession.commit (ActiveMQSession.java:583)
at org.apache.activemq.artemis.jms.example.QueueExample.main (QueueExample.java:93)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute (ArtemisClientPlugin.java:86)
at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute (ArtemisAbstractPlugin.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.activemq.transport.TransportDisposedIOException: Disposed due to prior exception
at org.apache.activemq.transport.ResponseCorrelator.onException (ResponseCorrelator.java:125)
at org.apache.activemq.transport.TransportFilter.onException (TransportFilter.java:101)
at org.apache.activemq.transport.TransportFilter.onException (TransportFilter.java:101)
at org.apache.activemq.transport.WireFormatNegotiator.onException (WireFormatNegotiator.java:173)
at org.apache.activemq.transport.AbstractInactivityMonitor.onException (AbstractInactivityMonitor.java:345)
at org.apache.activemq.transport.TransportSupport.onException (TransportSupport.java:96)
at org.apache.activemq.transport.tcp.TcpTransport.run (TcpTransport.java:200)
at java.lang.Thread.run (Thread.java:829)
Caused by: java.io.IOException: Unknown data type: 73
at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal (OpenWireFormat.java:349)
at org.apache.activemq.openwire.OpenWireFormat.unmarshal (OpenWireFormat.java:269)
at org.apache.activemq.transport.tcp.TcpTransport.readCommand (TcpTransport.java:221)
at org.apache.activemq.transport.tcp.TcpTransport.doRun (TcpTransport.java:213)
at org.apache.activemq.transport.tcp.TcpTransport.run (TcpTransport.java:196)
at java.lang.Thread.run (Thread.java:829)
[ERROR]