简体   繁体   中英

how to show/measure depth and threshold of a tibco queue/topics in java, spring boot

I want to show eit tibco jms queue depth and threshold in java. Is anyone has sample example of how to show queue depth and threshold.

Thanks.

You have to include tibjmsadmin.jar in your build path and then you can do this:

 TibjmsAdmin admin = new TibjmsAdmin(server, user, password);
 int numMsgs = admin.getQueues("Q1")[0].getPendingMessageCount();

Not sure what you mean by 'threshold' but maybe try getMaxMsgs()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM