0 Replies Latest reply on Feb 3, 2011 8:01 AM by Robert Lee

    Cleaning up temporary (management) queues

    Robert Lee Newbie

      We have recently started sending management messages using the core API.


      We do this in the case where we have a network error, and the client disconnects while the server believes the client is still connected; eventually, the server will receive a network exception and close the connection, but the client will continue to try to reconnect until this time, receiving a JMS exception each time (as the server thinks there is already an active consumer). To free up the connection, the client makes a call to the server to drop the connection when it gets into this state.



      Unfortunately, network errors (particularly timeout errors) are common in this case, and it seems that the management queue is created on the server as a temporary queue, and it does not always get deleted in the event of a client-side network error. So we end up seeing a large number of management queues in the system.


      Looking at the code, it seems that there is no way to clean up a temporary queue except by closing the client connection, with or without an exception. Is this correct, and are there any plans to add a timeout option or similar in future? Is there any other way to programatically destroy temporary queues over a certain age?


      This isn't a huge problem for us, as we can simply restart HornetQ to clear the temporary queues, but we don't like doing this as it can take the clients some time to reconnect, particularly at busy times.


      Thanks for any feedback.