close

 

public void close() throws JMSException;

Closes the message consumer. Because a provider can allocate some resources outside the Java™ Virtual Machine on behalf of a MessageConsumer , clients must close them when they are not needed. We cannot rely on garbage collection to reclaim these resources eventually because this might not occur soon enough. This call blocks until a receive() or active message listener has completed.

Exceptions

  • JMSException - with one of the following reasons:

    • MQJMS_EXCEPTION_MQ_Q_CLOSE_FAILED or

    • MQJMS_PS_SUB_Q_DELETE_FAILED


uj29310_