org.apache.activemq.artemis.api.core.client

## Interface MessageHandler

- All Known Implementing Classes:
    JMSMessageListenerWrapper

      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.

  See Also:
    `ClientConsumer.setMessageHandler(MessageHandler)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 © 2021 The Apache Software Foundation. All rights reserved.