JMS connection and sessions

V

Vikas Yadav

hi,
here is what i am trying to do.......

i am reading from one jms queue using multiple threads, using one
connection and multiple sessions (one session per thread) associated
with that......now my questions are

1) is it possible that one of the session dies and rest keep getting
the data(assuming a jms reader)?? if yes, then is it possible to
restart this session without restarting the connection itself?

2) if we create one connection par thread, can we rest assured that no
two threads are getting the same message....i.e. no data duplication
will be there??

Any help would be great....thanks a lot..

Thanks,
Vikas
 
M

Manish Pandit

1) is it possible that one of the session dies and rest keep getting
the data(assuming a jms reader)?? if yes, then is it possible to
restart this session without restarting the connection itself?

Yes, as long as other sessions are alive, they can keep getting the
data. However, if the single connection that is supporting all
sessions dies, there is no way to read messages as all sessions would
die automatically.
2) if we create one connection par thread, can we rest assured that no
two threads are getting the same message....i.e. no data duplication
will be there??

If you are using Session.DUPS_OK_ACKNOWLEDGE in the session, then
there could be duplication. But if you use transactions and/or
AUTO_ACKNOWLEDGE/CLIENT_ACKNOWLEDGE, there will not be duplicates -
however you would see a drag in performance.

-cheers,
Manish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top