-
1. Re: List of pending/undelivered messages on a Topic
stephanenicoll Jul 28, 2003 5:00 AM (in response to zaheerah)You mean, get it without consuming it right?
Use a QueueBrowser for that. It allows you to browse the queue without removing its content (see JMS spec) -
2. Re: List of pending/undelivered messages on a Topic
zaheerah Jul 28, 2003 5:25 AM (in response to zaheerah)Yes! I want to get the pending ones without consuming them...
As far as my understaning goes! QueueBrowser can only be used with Queues not Topics??? will take another look at the specs anyway...
Please explain if there is a way to use a queue browser for topics.....
Thanks and regards,
Zaheer -
3. Re: List of pending/undelivered messages on a Topic
stephanenicoll Jul 28, 2003 6:12 AM (in response to zaheerah)As far as I know, no
There are pending msg in a topic in those case :
- durable subcriber does exist for that topic. JBossMQ will wait such a connection to deliver pending messages
- message is being processed (i.e. sent to all subscribers). When it's sent, it's removed from the topic
So it's difficult to know what you mean by pending messages on a Topic. it depends of your configuration I guess.
Please provide more details -
4. Re: List of pending/undelivered messages on a Topic
zaheerah Jul 29, 2003 1:12 AM (in response to zaheerah)Dark Lord!
You are absolutely correct. I do have a durabel remote subscriber. which connects at certain times during the day. In this case all the messages published on a particular topic will be persisted untill they have been received by the remote subscriber.
For reconciliation sake! on the local side the application should be able to tell that out of all the messages published on a given topic how many have been delivered and how many are still waiting to be delivered.
I hope it explains...
Thanks and regards,
Zaheer -
5. Re: List of pending/undelivered messages on a Topic
stephanenicoll Jul 29, 2003 1:16 AM (in response to zaheerah)Yeah it does explain a lot actually. Well as far as I know there is no mechanism for doing that but a crappy one.
You can SQL the JMS_MESSAGES table on the destination if you have only one subscriber. The number returned will be the message for that topic which have not been delivered so far.
Do not forget that message can be cached but if persistence is enabled, there are most probably on DB as well.
This solution is not elegant at all but it might be a start
select count(*) from jms_messages where destination = 'TOPIC.yourTopic'; -
6. Re: List of pending/undelivered messages on a Topic
stephanenicoll Jul 29, 2003 1:17 AM (in response to zaheerah)If your Persistence Manager is JDBC of course :)
-
7. Re: List of pending/undelivered messages on a Topic
schrouf Aug 7, 2003 3:01 AM (in response to zaheerah)You can use the the Topic JMX MBean Operation getMessageCounter() that will give you a detailed state list of all topic internal queues including current queue depth (= no of pending msg). Have a look at the jmx-console / jboss.mq.destinations.
-
8. Re: List of pending/undelivered messages on a Topic
schrouf Aug 7, 2003 3:02 AM (in response to zaheerah)This should also work with all PersistenceManagers, not only the JDBC2 PM.
-
9. Re: List of pending/undelivered messages on a Topic
zaheerah Aug 7, 2003 5:33 AM (in response to zaheerah)Thanks Schrouf,
This sounds interesting.... will start working on it.. sounds like a more reliable and easy way... Other wise I was still struggling with JDBC2 and Hypersonic...
thanks again....
Zaheer