Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Simple JMS quuestion

Posted on 2002-07-03
8
Medium Priority
?
255 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 160 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

636 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