want to read messages from queue

G

gk

I have a JMS Server in weblogic server . it has a queue in it . i want
to read the message count in queue .

so,
I want to write a program which will read

1. messages pending
2. Total Message


from the queue


How do i start ?

from a priliminary guess , i have to do with MBean ...is it true ? can
anybody push me to the right direction ?

any link /ideas are appreciated
 
G

gk

somebody ? anybody ?

is my question not understandable ? i want to read the number of
messages in a queue in weblogic server .....this is the question .
 
H

hvt

somebody ? anybody ?

is my question not understandable ? i want to read the number of
messages in a queue in weblogic server .....this is the question .

Total number of messages in the queue can be found using
queue.browse() method. This method basically reads the queue without
deleting values from the queue as deletion happens with
queue.receive() message. browsing the queue might be helpful to
determine the queue length though this approach is feasible for
smaller (and fixed length) queues where there is not much overhead
timing vise.

I don't understand what do you mean by messages pending! as only
measurable thing in JMS Queue in number of messages contained. If you
mean that messages pending are those which are waiting to be written
into the fixed-length-queue, I don't 've exact answer to this as it
will depend upon how insertion functionality works.
Note: queue is an instance of Weblogic's JMS Queue implementation.

Also Weblogic's console provide JMS Monitoring page where you can see
number of messages present in the queue plus some other details.

With Regards
 
B

blmblm

somebody ? anybody ?

is my question not understandable ? i want to read the number of
messages in a queue in weblogic server .....this is the question .

I notice that you did get a reply later, but a thought about how
to do better another time, maybe: If your question is specific
to JMS / Weblogic (and I can't really tell since I don't know
anything about either of these), maybe it would help to put that in
the subject line -- "read messages from JMS server" or something.
That way people who don't read all the threads but have the right
background to answer your question would be more likely to notice it.
 
G

gk

I don't understand what do you mean by messages pending! as only
measurable thing in JMS Queue in number of messages contained. If you
mean that messages pending are those which are waiting to be written
into the fixed-length-queue, I don't 've exact answer to this as it
will depend upon how insertion functionality works.
Note: queue is an instance of Weblogic's JMS Queue implementation.

Also Weblogic's console provide JMS Monitoring page where you can see
number of messages present in the queue plus some other details.

With Regards


ok.

How do see message queue in weblogic ?

you first login

go to JMS

choose the queues >Mionitor the queues

when you see the queues , you find table with columns , message
received, messace pending etc etc.

I want to get all those values programmatically
 
K

kvasani

ok.

How do see message queue in weblogic ?

you first login

go to JMS

choose the queues >Mionitor the queues

when you see the queues , you find table with columns , message
received, messace pending etc etc.

I want to get all those values programmatically

Have a look at weblogic server documentation (appropriate to your
version).
From Version 7 onwards, they have concept of MBeans, which gets
created for each component running on server, including JMS/EJB/Web
application etc.

All you need to do is find correct MBean, & monitor it's state.

KV
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top