Announcement Announcement Module
No announcement yet.
Using Spring with temporary dynamic Queues (IBM MQ) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring with temporary dynamic Queues (IBM MQ)

    I use the JmsTemplate and an extension of the DefaultMessageListenerContainer (DMLC) extensively. The pattern that Spring generally follows is to close the connection after completion of a task. Since my JMSConnectionFactory is backed by a pool, closing a connection just puts it back in the pool instead of destroying the actual physical connection. Else it would'nt have been practical to use these classes that used a connection per task.
    When I want to use a temporary dynamic queue as a response queue (replyToQueue field), this queue gets destroyed at the end of each request-response because the JMS connection is closed. The JMS spec says that the temporary queue should be closed when the connection creating it is closed.
    This is too impractical as it creates a lot of ware and tear on the MQ Server.

    What is the best approach to making this work?