This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes ActiveMQ topic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ActiveMQ topic" Watch "ActiveMQ topic" New topic
Author

ActiveMQ topic

reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
I'm trying to get familiar with ActiveMQ topic. I created a publisher and subscriber, with topic that expires in 30 seconds

Here is the code for publisher:




See the last a few lines, I have made the topic "topic.Example" be persistent and called setTimeToLive(). Although a subscriber cannot receive a message that created longer than 30 seconds. I don't see ActiveMQ server admin automatically shows the expired topic "ActiveMQ.Advisory.Expired.topic.Example". Then how do I let subscriber know a topic message is expired and do something accordingly?

BTW, in the ActiveMQ server admin, all the topic's 'Messages Enqueued' column values are always ever incremented. Does this mean memory keep all messages around? Where and how do I setup its limit?

Thanks.


SCJA, SCJP5.0, SCBCD, SCWCD
reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
Can someone please give some advice? I created a topic messages on 'topic.Example' that expired in 30 seconds, but the server do not send a message automatically to subscriber that listens on 'ActiveMQ.Advisory.Expired.topic.Example'. Am I doing wrong somewhere or is this just how ActiveMQ behave?

Do I have to reply on Java to count expiration time to do something upon expiration?

Thanks.
 
wood burning stoves
 
subject: ActiveMQ topic
 
Similar Threads
How to use Hornet Q in JBoss 6.0 Final
JMS: Problem with Consumer Program
JMS Consumer ends even after implementing MessageListener interface.
JMS: Problem with Consumer Program
JMS Consumer not receiving any messages.