0
votes

I am trying to create a durable subscription to a multiple consumer queue in oracle. Using the JMS Spring support. This is a Grails application.

My spring code is as follows:

myQueueConnectionFactory(uk.my.MyQueueConnectionFactory) {
                dataSource = ref("dataSourceListener")
            }

            myMessageListener(uk.my.MyMessageListener)

            jms.'listener-container'( 'client-id':'clientid', 'connection-factory':'myQueueConnectionFactory', 'acknowledge':'auto', 'concurrency':'1', 'destination-type': 'topic' ) {
                jms.'listener'( destination:'my.queue', ref:'myMessageListener', subscription: 'subscription' )
            }

I have specified the client-id and subscription values. But it appears that each time I make a connection to the queue, a new consumer is registered. Showing as something like 'TSUB_....' If I stop and start my application, then another consumer is created, and any messages added to the queue whilst the application was down are not dequeued.

Can anyone point me in the right direction to create a durable subscription. I had thought that my 'client-id' and 'subscription' values would do this for me. Do I need to specify these elsewhere?

Thanks!

1

1 Answers

1
votes

Ok, I found the solution to this. Updating my destination-type to 'durableTopic' did the trick.