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.

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

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

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. "

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 …

How to fix incompatible JVM issue while installing Eclipse
While installing Eclipse in windows, got one error like above and unable to proceed with the installation.
This video describes how to successfully install Eclipse.
How to solve incompa…