Author |
Message
|
balareddy |
Posted: Tue Feb 21, 2006 3:55 am Post subject: Message count in Standard JMS Queue |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Hi,
How to get message count in JMS Queue with Standard JMS. I am not using any application server. it is just a sample of standard JMS with message store can be either AQ or MQ or something esle.
in JMS, QueueSession has createSender(),createReceiver() and QueeuBrowse() methods to get/put/browse messages in Queue. With Browse option we can get count with getEnumeration() method. But it takes time if Queue has 1000 msgs.
If i wanted show msg count in each Queue( suppose i have 20 Queues) frequently in a time interval(example.. every 15 seconds) , what have to do???
pls help me out ....
[/b] _________________ bala |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 21, 2006 4:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Get the MS0B support pack and use pcf messages to get the information.
This would only be good for a monitoring app as the message count by itself is quite meaningless. Messages that are not in a gettable state are included in the count.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
balareddy |
Posted: Tue Feb 21, 2006 4:15 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
fjb_saper wrote: |
Get the MS0B support pack and use pcf messages to get the information.
This would only be good for a monitoring app as the message count by itself is quite meaningless. Messages that are not in a gettable state are included in the count.
Enjoy  |
I am using standard JMS accessing MQ Queue(machine B) with JNDI from different machine(machine A). But MS0B performs administration tasks at MQ server side(machine B).
In my application(machine A) i have to display msg count. it is for monitoring only but it has to be displayed from program(machine A). _________________ bala |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 21, 2006 4:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So what's the problem?
You can't access the SYSTEM.COMMAND.QUEUE on the other qmgr?
You can't move the content of the PCF message to a bytes message?
You can't move the content of a bytes message to a pcf message?
You don't have default paths between the 2 qmgrs ?
You can't set a reply to queue on your messages ?
Get to work!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
EddieA |
Posted: Tue Feb 21, 2006 10:55 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
But MS0B performs administration tasks at MQ server side(machine B) |
Because that's where all the queues are. You are connecting to that server as a client, either for this monitoring, or as your JMS application. No difference.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|