I also noticed the bizarre behavior of peekEvents function. I’m very glad you reported it to Support, I was about to do it myself.
But I observed something more. I run my program (very similar to yours - see code below) several times. Then my Broker started to crash - every time I called the destroy method, the awbroker process went down. Eventually, whole Broker disappeared! I couldn’t really believe it. The Broker Server was still in place, but Broker itself was gone. Neither WmBrokerAdmin nor broker_status reported its existence. So I created it again and now I’m trying to crash it again.
cadmin = new BrokerAdminClient("localhost", "broker", null, "admin", "Test Admin Client", null);
// Get the target client queue’s lock
qlock = cadmin.getClientQueueLock(“test__someTrigger”);
events = qlock.peekEvents(0, 10, 10000);
System.out.println(events.length);
// Release the lock on the queue
boolean flag = qlock.releaseLock();
if (flag != true)
{
System.out.println ("Lock not released: " + flag);
}
/* Clean up */
cadmin.destroy();
#Universal-Messaging-Broker#Integration-Server-and-ESB#webMethods#broker