MDB or simple client

Hi all
I want to write little application using JMS technology.
I want to have more then one consumers to that topic but I don't want them to work on the same messages, means if I have two consumers, the first message arrive will be handled by the first consumer and the second message by the second consumer, should I use MDB for this porpuse ?
How can I perform it?
   Thanks
dannyshAsked:
Who is Participating?
 
nir2002Connect With a Mentor Commented:
yes, it is server property.
please look at your application server documentation to see how to configure your server.
0
 
nir2002Commented:
Hi Danny,

For helping you I need to have additional information:
1) does the sender know or can know who is the reciever?
2) Is a specfic reciever dedicated to specfic task, waiting to specfic message?
3) For what reasons you need more than one client?

note: when you write a message driven bean you can define how much listeners so when a message arrive the "first" instance handle it, if another message arrive before the "first" finish handle the message the "second" listener handle this arriving message otherwise either the "first" handle the message or other listener handle the second message.

Best regards
Nir
0
 
dannyshAuthor Commented:
Hi Nir
Nice to hear from you agian.

for your questions:
1. The reciver doesn't care who send the message. Is it possible to know who is the sender?

2. I don't need specific reciever to a specific sender.

3. I need more then one client cause my clients perform long task, and I don't want to create a bottle neck at this point.

Is it possible do define how much listeners I want in MDB?

    Danny
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
dannyshAuthor Commented:
Nir thank you for your help.
   Danny Shaul
0
 
nir2002Commented:
I glad I could help you
best regards
Nir :-)

0
 
dannyshAuthor Commented:
BTW
Is it possible to define the topic to connect to not via XML file. can it be at run time?
0
 
nir2002Commented:
What you mean? your mdb will choose on the fly to which topic to be listen?
0
 
dannyshAuthor Commented:
Yes, is it possible?
0
 
nir2002Commented:
As I recall spec, you can't but need to look the spec again for be sure.
0
 
dannyshAuthor Commented:
Thnaks a lot Nir.
0
All Courses

From novice to tech pro — start learning today.