• Post Reply Bookmark Topic Watch Topic
  • New Topic

Control Message in JMS  RSS feed

 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could anyone tell me what to use for a "end of Message" marker for sending messages in a a JMS queue? I'm looking for some best practices, or something of the sort.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean you want to send a single logical message split over many actual JMS messages? If so, you might want to look at something like ActiveMQ's grouping capabilities.
 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I meant that I want to send a sort of end-of-message marker for a set of messages in the queue that tells the code on the other end that it can stop listening, and was wondering about best practices on the issue.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if this is a normal JMS listener (i.e. single threaded) you can just send this message and write code to do whatever you want. This will not work in a multi threaded environment (you have no control over which messages gets processed first there), hence my ActiveMQ groups recommendation.
 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Er,I really don't know much about ActiveMQ, (I'm just learning JMS). Could you point me to some resources?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here it is.
 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, will check, and thanks a lot for the help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!