Link to home
Start Free TrialLog in
Avatar of narcist527
narcist527

asked on

JMS Tibco queue/topic : how to get messages count of queue?

any one can help he in how to get messages count of tibco queue using java? appreciate any help

thanks in advance
Avatar of gurpsbassi
gurpsbassi
Flag of United Kingdom of Great Britain and Northern Ireland image

you want to get the number of messages currently on the queue?
Avatar of narcist527
narcist527

ASKER

@gurpsbassi, yes. we are using ssl connection . thanks
And there are no consumers of the queue?
If there are consumers, then the messages will not remain on the queue for you to count.
no one will consume these messages as this is an error tibco queue.
In that case I would use a QueueBrowser
TibjmsAdmin admin = new TibjmsAdmin(server, username, password);
         
            QueueInfo info = admin.getQueue(queue);

          long  pendingMessages = info.getPendingMessageCount();
            StatData sd = info.getInboundStatistics();
           long TotalMs =sd.getTotalMessages();

it is throwing some security exception even though I am using correct credentials
ASKER CERTIFIED SOLUTION
Avatar of gurpsbassi
gurpsbassi
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial