receive

 

public Message receive() throws JMSException;

Receives the next message produced for this message consumer.

This call blocks indefinitely until a message is produced or until this message consumer is closed.

If this receive() is done within a transaction, the consumer retains the message until the transaction commits.

Returns

  • the next message produced for this message consumer, or null if this message consumer is concurrently closed

Exceptions

  • JMSException - if the JMS provider fails to receive the next message due to an internal error.


uj29360_