The other option that I have read about would have your generalist listen to another queue. Have the specialist forward the message to the generalist if it is not interested. This may be faster than using the selector. -Chris Thompson Bean-test Developer http://www.empirix.com
-----Original Message----- From: Fred Loney [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 5:03 PM Subject: Re: Can one queue have multiple comsumers? There can be multiple MDB queue receivers. The MDB container delegates to a single available MDB instance whose selector matches the message attributes. The JMS spec does not specify which potential receiver gets the message, but does specify that at most one receiver gets the queued message. The queue MDBs should partition the messages based on selector. Otherwise, a pub/sub topic is a better choice. An interesting variation is two MDBs, a specialist and a generalist, for the same queue. The specialist MDB has a selector, the generalist does not. The desired behavior is that the specialist grabs the message if the selector matches, otherwise the generalist handles the message. AFAIK the way to do that is to add a selector to the generalist that excludes messages handled by the specialist. Is there a good alternative? Fred Loney Spirited Software, Inc. www.spiritedsw.com ----- Original Message ----- From: "Alvin Wang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 28, 2002 6:53 AM Subject: Can one queue have multiple comsumers? > Hi! If I setup multiple MDB listening to the same queue, is it possible? > what will happen? Will they race against each other? Or one will override > the others? Or all the listener will receive the message whenever there is > one available (same as pub/sub)? And can I also use selector to let the MDB > select there own messages exclusively? > > Thanks! > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
