You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "David Dou (JIRA)" <ji...@apache.org> on 2016/03/15 18:46:33 UTC
[jira] [Resolved] (AMQ-6196) After a few hours, an NMS application
cannot publish to a temporary queue created by a Java application
[ https://issues.apache.org/jira/browse/AMQ-6196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Dou resolved AMQ-6196.
----------------------------
Resolution: Workaround
While I use failover in integration and production, for this test, I only use one broker (that I do not stop during the test). My Java client creates a connection on initialization and keeps it until it exits (unless an underlying layer restarts the connection for me). The C# client does not seem to disconnect either.
And I do not have this issue between two Java applications or with a broker 5.10.2.
Still, using the option you provided worked so I resolved this JIRA.
> After a few hours, an NMS application cannot publish to a temporary queue created by a Java application
> -------------------------------------------------------------------------------------------------------
>
> Key: AMQ-6196
> URL: https://issues.apache.org/jira/browse/AMQ-6196
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.13.1
> Reporter: David Dou
> Attachments: Program.cs, ScheduledRequesterDemo.java, activemq-61616.xml
>
>
> Using (provided as attachments):
> * the Java application {{ScheduledRequesterDemo}} using the 5.13.1 or 5.4.1 ActiveMQ jars running on Windows
> * the C# application {{Program}} using the NMS 1.7.1 assemblies
> * the activemq-61616.xml configuration for the broker 5.13.1 running on Windows
> * Java 1.7 (for the Java application and the broker)
> Test case on Windows (request/reply):
> # launching the C# application with "tcp://localhost:61616 test.nms.1.7.1" as parameters - it listens on the queue "test.nms.1.7.1" for request message
> # launching the Java application with "failover://tcp://localhost:61616 test.nms.1.7.1" as parameters - it periodically sends a request on the queue "test.nms.1.7.1" and waits for the response on a temporary queue it has created
> # letting them run for 5 hours
> After 3-5 hours, the C# application fails to detect the temporary queue (that is visible in the JMX console during the 10 seconds wait). The C# application error message is:
> {noformat}Apache.NMS.InvalidDestinationException: Cannot publish to a deleted Destination: temp-queue://ID:hostname-58526-1455174063005-0:1:27{noformat}
> The Java application logs an error since it did not receive the response on the temporary queue.
> Restarting the broker resolves the problem temporary, until a few hours later it occurs again.
> Note that this test was also done the same error with:
> * the same 5.13.1 broker running on Linux
> * the Java application using 5.4.1 running on Linux
> * the C# application using NMS 1.5.1
> With an ActiveMQ broker 5.10.2 (or 5.4.1), after two days running on Linux (with the Java application using the 5.4.1 jars), this issue never occurs.
> It is likely unrelated, but during the tests on Windows, before the first failure (between several minutes and an hour), the broker logged a single warning:
> {noformat}WARN [ActiveMQ NIO Worker 373] [Service] Async error occurred: java.lang.NullPointerException{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)