Solved

Simple JMS quuestion

Posted on 2002-07-03
8
248 Views
Last Modified: 2010-03-31
Hi all
Can subscriber subscribe messages that published to the Queue befor he asked to subscribe messages? I need to know if it's configurable.
   Thanks  
0
Comment
Question by:dannysh
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
Hi,

I don't think I understand what you are trying to ask.
you can "publish" messages to topic/queue and you can become listener to messages destinate to  specfic topic/queue (this is to "subscribe" to this specfic topic/queue).

Note that the subscribe/publish words, there proper use is in context of topic and not of queue.

In general Object can make himself listener (subscribe himself) and subscribe other object before/after he subscribe himself I have alreday done it.

Best regards
Nir
0
 

Author Comment

by:dannysh
Comment Utility
Hi Nir
What I mean to ask is if subscriber can consume messages that where published to the topic before it connect that topic as subscriber?
 
   Danny
0
 

Author Comment

by:dannysh
Comment Utility
Is it possible control this via the setTimeToLive() method of topicPublisher class? What happen to a message that have TTL of 60 seconds and after 30 seconds subscriber register himself to that topic? will he get that message even that he register after the message sent to that topic?
   Danny
0
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
Hi Danny,

For retrieving all messages (including ones that you were inactive)on topic, you should subscribe as durable subscriber.

Offcourse if a message have expired, you won't get it.

Hope it help.
Nir
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:dannysh
Comment Utility
Hi Nir
Do you mean expired after time to live? By default time to live value is set to zero (from documentation) which means unlimited time am I right?
What does durable means? Isn't it only for cases when the server is falling down and then up?
   Danny
0
 
LVL 2

Accepted Solution

by:
nir2002 earned 40 total points
Comment Utility
Hi Danny,

yes you right the deafult is unlimited time, message never expires (Although I am not certain the value is zero, if you want to set expiration simple use setJMSExpiration(long expiration)).

for the second part no, in API:
"If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable TopicSubscriber. The JMS provider retains a record of this durable subscription and insures that all messages from the topic's publishers are retained until they are acknowledged by this durable subscriber or they have expired. "

Best regards
Nir


0
 

Author Comment

by:dannysh
Comment Utility
Thanks a lot Nir.
BTW where are you from?
0
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
I am glad I could help you :-)
If you want to correspond
nirp_98@yahoo.com
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Fibonacci challenge 11 82
triangle challenge 4 75
Eclipse Neon and jdk 1.8.0 11 64
micro services vs rest web services 16 45
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now