Solved

Simple JMS quuestion

Posted on 2002-07-03
8
249 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
ID: 7129408
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
ID: 7130146
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
ID: 7130149
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
ID: 7134683
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dannysh
ID: 7134688
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
ID: 7134698
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
ID: 7134701
Thanks a lot Nir.
BTW where are you from?
0
 
LVL 2

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
create a gui in perl 3 70
github account with ecipse 1 42
Apps blocked by Java 9 60
MySQL  on Tomcat 8 26
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

912 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

16 Experts available now in Live!

Get 1:1 Help Now