Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JMS Session related questions

  Asked By: Clifton    Date: May 13    Category: Java    Views: 655
  

I was reading about JMS. I noticed that both Message ( TextMessage
say
) and TopicPublisher/QueueSender are both being created from Session.
Why is this so. What was the reason behind this decision by the
standards committee.
1. Is it OK to create a TextMessage from one Session and send it
through a TopicPublisher created from another Session. ( Assume in
this case that both sessions are from the same vendor/provider ). I
understand that everything related to a session will have a
serializing effect. So in this case how will the above be serialized.
with respect to the session that created the TextMessage or with
respect to the session that created the TopicPublisher.

2. Will it work if the 2 sessions in the case above are from 2
different vendors/providers. ( Can I send a TextMessage created by
one
vendor's Session through a TopicPublisher that was created from
another vendor's session. ). In other words do I have to duplicate
the
TextMessage, in order to write an application that acts like a
bridge.

3. In general what will happen if a subscriber crashes/dies and comes
back. Will its subscription be still active. In particular what will
happen if a durable subscriber dies and comes back up. Will it
continue to receive messages. Will he also receive the messages that
the topic received while the subscriber was down.

4. We have a situation that demands temporarily blocking the incoming
messages, while the pending messages inside the Queue/topic are above
a particular numbers.
During this time all the producers should get some kind of exception,
if they attempt to put more messages to the topic. Later when the
number of pending messages drop below a certain level - as a result
of consumers fetching the messages - the topic should start to accept
more messages.
Essentially I m looking for a way to flow control the destination.
Is this possible at all using JMS.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on JMS Session related questions Or get search suggestion and latest updates.




Tagged: