0

Can anyone give me an example of how to open and close a connection to a queue using JmsTemplate?

At the moment I am reading a lot of messages from a queue using the receiveSelected() method. However, every time I read a message the org.springframework.jms.connection.singleconnectionfactory open and closes a connection for each message the application reads.

I would like instead to open a connection read lots of messages from a queue and then close the connection.

Thanks

dk14
  • 22,206
  • 4
  • 51
  • 88
max
  • 53
  • 8

0 Answers0