Solved

Simple JMS quuestion

Posted on 2002-07-03
8
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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
 

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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…

717 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