0

I've integrated ActiveMQ NMS with my asp mvc website and it's working great for the most part, but I've run into a brick wall with my recent issue and can't figure out for the life of me whether it's something I'm missing, lack of API support, or even a design flaw (perhaps in the API)...

I'm trying to do a simple thing - I need to check if a temporary queue has been removed before trying to send a message to it. The temporary queues are deleted as soon as the client disconnects, closes the browser, etc. which is fine since that's why I'm using temporary queues. however, I store the destinations on the server so i can send certain messages to certain destinations WHILE they are still connected. everything works great until a client leaves/closes the browser, which means ActiveMQ will remove the temporary queue and I need to stop sending messages to that temporary queue until they reconnect because if I try i get this exception:

javax.jms.JMSException : The destination temp-queue://ID:WIN-HP6U1SD1FB4-29628-1329687650640-0:1:85 does not exist.

which makes total sense, cuz the temp queue is gone since they left the page or closed the browser. But here's the kicker that kills me - after this exception (which I catch) the entire messaging system goes down! activemq just no longer sends messages until i restart it. this seems absolutely crazy unless i am missing something very fundamental in how i'm using it. basically what i can't figure out is:

1) why does activeMQ go down when it tries to send a message to a temp queue dest that doesn't exist?? why can't it just throw the exception and continue??

2) fine I can live with #1, but how do i check if a temp destination queue exists before i send it? nothing in the API seems to support this.

3) if #2 for some crazy reason isn't possible, how do I recover from this jms exception that brings down the entire message queue system?

I'd post code but not sure that would help here.

ijjo
  • 525
  • 9
  • 22

1 Answers1

1

I think you've run into an NMS bug that has been resolved recently (see https://issues.apache.org/jira/browse/AMQNET-377). If you update to version 1.5.5 or later, you should have better results.

Jim Gomes
  • 774
  • 8
  • 15