A ClientConsumer receives messages from HornetQ queues.
Messages can be consumed synchronously by using the
receive()
methods which will block until a message is received (or a timeout expires) or asynchronously by setting a {@link MessageHandler}.
These 2 types of consumption are exclusive: a ClientConsumer with a MessageHandler set will throw HornetQException if its
receive()
methods are called.
@author
Tim Fox
@author
Clebert Suconic
@author
Andy Taylor
@see ClientSession#createConsumer(String)