IMessageHandler Interface

public interface IMessageHandler

Defines the contract for registering the callback QueueClient#registerMessageHandler(IMessageHandler) and SubscriptionClient#registerMessageHandler(IMessageHandler) for QueueClient and SubscriptionClient.

Method Summary

Modifier and Type Method and Description
void notifyException(Throwable exception, ExceptionPhase phase)

Receiving the exceptions that passed by pump during message processing.

CompletableFuture<Void> onMessageAsync(IMessage message)

The callback for message pump to pass received Messages.

Method Details

notifyException

public void notifyException(Throwable exception, ExceptionPhase phase)

Receiving the exceptions that passed by pump during message processing.

Parameters:

exception - Exception received in pump.
phase - Exception phase.

onMessageAsync

public CompletableFuture onMessageAsync(IMessage message)

The callback for message pump to pass received Messages.

Parameters:

message - The received Message.

Returns:

CompletableFuture for the message handler.

Applies to