This illustration shows the use case Receiving a Message Synchronously Using a Message Consumer of the class Message Consumer in the JMS Operational Interface.

The method used is receive, specifying timeout.

When you receive a message, you may optionally specify to Wait Forever and the Timeout.