Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActiveMQ topic

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic