activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Cheung" <>
Subject How can I completely shutdown ActiveMQ client correctly?
Date Wed, 21 Mar 2007 15:12:31 GMT
I have some problem on shutting down the ActiveMQ client (not the broker).

I have a Java application using ActiveMQ 4.0.2.  (async send is already
disabled, tcpNoDelay is enabled)

   1. Create temporary topic A.
   2. Send message to another queue B.
   3. Receive a message on topic A, with a timeout given.
   4. Send 2nd message to queue B.
   5. Close the application

On step 5, I do close all safe shutdown step,
  close producer, close consumer, delete TemporaryQueue, close JMS session
and close JMS connection.
But I found that some ActiveMQ thread still running on the background.
And my client application does not shutdown after "static void main"
((It is a multi-thread application. I am not sure is it my thread or
activemq thread is not daemon, and JVM was blocked and not shutting down.))

And now, I have to call System.exit(0) to force the JVM being closed.

I just want to make sure that is it a safe operation?? The ActiveMQ broker
will not fail?

Beside, I found that there are so many Advisory Message consumer of
temporary topic/queue on the BROKER, ever if all client are already closed.
Is it related to the above statements?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message