## org.hornetq.api.core.client
Interface MessageHandler

    public interface MessageHandler

A MessageHandler is used to receive message asynchronously. To receive messages asynchronously, a MessageHandler is set on a ClientConsumer. Every time the consumer will receive a message, it will call the handler's `onMessage()` method.

Author:
  Tim Fox
See Also:
  `ClientConsumer.setMessageHandler(MessageHandler)`

Method Summary
`void` `onMessage(ClientMessage message)` Notifies the MessageHandler that a message has been received.

Method Detail

### onMessage

    void onMessage(ClientMessage message)

  Notifies the MessageHandler that a message has been received.

  Parameters:
    `message` - a message

Copyright © 2009 Red Hat Inc. All Rights Reserved.