Excellent! Thank you for the help. I may have a race condition that I've thought of that may cause problems, but this may be taken care of my the grouping. If you could give me some advice, I would really appreciate it.
It pertains to the grid processing and the nth and n-1 messages in a group in a 2 node or greater environment. Lets say we have n messages in the group, where the last message (n) sets the sequence number to 0 to close the group. When my n-1 message is consumed off the input queue, it will take a few seconds to process. The nth message is to signal the group is closed, so the receiving MDB will simply push a new message with the sequence 0 on to the output queue. The message with 0 will be on the output queue before the n-1 sequence is pushed. Won't my n-1 message get excluded from the group since its inserted after 0? This is an implementation detail, but an important one. Below is an ASCII diagram of my queues and MDB Standalone file reader--->Input Queue (jms/StatInput)--> MDB >-- Output Queue(jms/StatOutput) --> Consumer As you can see, I have 2 queues for round trip communication, will this cause the sequences issues I described above? If so, do you have any ideas on how I can get around them? As far as my message size, each one is between .5k and 1.5 k. Thank you for all your help, it is greatly appreciated. Todd James.Strachan wrote: > > On 4/10/07, tnine <[EMAIL PROTECTED]> wrote: >> >> Hi All, >> I'll be writing a process that uses parallel grid processing to process >> message groups. I'm new to Active MQ and could use some help in finding >> documentation or examples. >> >> I'll be running in the following environment >> Java 1.6 >> JBoss 4 >> Active MQ 4.1.1 >> RHEL4 >> >> I know I will be performing the following operations. >> >> 1. Create a text message with the following format. [company-name]-[ISO >> Date] >> 2. Push all text messages into this group >> 3. When I'm done producing all of the messages, I'll perform the >> message.setIntProperty("JMSXGroupSeq", 0); to close the group. >> >> I have have the following questions. >> >> Producer/Consumer >> >> 1. Is it possible to insert multiple messages into the queue in a single >> XA >> transaction? > > Yes - whether using JMS or XA transactions, you can send or receive > multiple messages; its up to you when you do the commit > > >> If so is there an example? Since the input is a large flat >> file, I want either all messages to be inserted or none. > > How large is the file? > > >> 2. Is there a way for me to detect on the MDB side when the last message >> is >> sent? Can I simply perform the message.getIntProperty("JMSXGroupSeq") and >> search for the value 0 to find the last message? > > Sure. Or just add your own header to indicate the last message if you > prefer > > >> 3. I have 2 queues, one input queue, and one output queue. Both queues >> need >> to be processed in the exact same order. As the MDB reads from the input >> queue, can I put the same JMSXGroupSeq number into the output queue >> message >> and still have the same ordering semantics without screwing up the Group >> processing in Active MQ? > > The 2 queues are processed separately by different consumer groups; > but sure order would be guarrenteed if you use the same JMSGroupID > > >> Monitoring >> >> I want to write a simple webapp that shows the percentage of message in >> the >> queues. Is it possible to read the groups, and for each group show the >> messages on the queue? > > Not efficiently; you could write your own Interceptor to do just that > > http://activemq.apache.org/interceptors.html > > but you could inefficiently do it by just browsing the queue via the > QueueBrowser on JMS to figure out the numbers etc > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/Input-queue-and-output-queue-grouping-and-sequences-question-tf3554541s2354.html#a9950154 Sent from the ActiveMQ - User mailing list archive at Nabble.com.