• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS MDP listener: stop/start/restart?

 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



How can I have a handle on the queue listener (queueMessageListener) so that I can stop/start/restart?
For example, when the jms:listener-container is up but some how the queue listener did not pick up
the messages when I put some message into the queue. 1M Thanks.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, when the jms:listener-container is up but some how the queue listener did not pick up


That should not happen there is the equivalent of a while(true) in the container looping and waiting for a message. If you set your logging to TRACE your log will be flooded with the messages from this.

Typically stopping, starting and restarting would be a good job for JMX. If you take a look at Spring Integration all of these niceties are there for you out of the box. Also with Spring integration you can alternatively autowire the adapter into a service which you could access from a UI and call the lifecycle events on it.



 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Trace set.
2. Have a quick look at JConsole.
3. Is this what you meant for Spring Integration, for example



4. DI into a web controller for example and use it for start/stop

 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup that is the idea They have implemented all the smart life cycle events. If you wanted to investigate further your JMX options as well you can check out this presentation by Garry Russel http://www.infoq.com/presentations/Managing-Spring-Integration also have a look at the reference docs. The orderly shutdown stuff is really nice http://static.springsource.org/spring-integration/reference/htmlsingle/#jmx-shutdown This allows in flight messages to complete while not accepting new messages. Very handy when you need to take things down in an orderly manner and the inbound/outbound adapters must be taken down in a specific order.

here is another video much the same but on youtube http://www.youtube.com/watch?v=TetfR7ULnA8

Anyways hope that helped you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic