Help to get first message in Queue


For monitoring purposes I would like to have a Java service which would get the first message in a client queue. (of course without deleting it from the client queue).

Then once I have the document in IDATA in flow service I can filter from the _env the enqueueTime.

I’m guessing that the Broker Java API is the way to go for this.
Something like :

  1. Browse client queue
  2. Set position to 1
  3. Get the document
  4. disconnect

Can anyone help providing a sample Java code for this?

Thanks a lot for your eventual help.


You can create a webMethods trigger and let it subscribe to the documents and keep it in serial mode.

As soon as it subscribes the first document, automatically disable it via disable trigger service.