Joke Collection Website - Public benefit messages - In JAVA development, how to query the queue handle status in MQ?

In JAVA development, how to query the queue handle status in MQ?

Do you use IBM MQ or Apache? It can generally be obtained through JMS of JAVA.

For example, there is an MQQueue object in IBM MQ.

//Get the queue instance

MQQueue QUEUE = qmgr . access QUEUE(" TEST _ QUEUE ",open options);

//Gets the length of the longest message in the current queue.

queue.getMaximumMessageLength()

//Get the maximum depth of the current queue.

queue.getMaximumMessageLength()

It also provides other functions. Specifically, you can download a WebSphere MQ API and find MQQueue at a glance.