Interface PubrecOutboundInterceptor

All Superinterfaces:
Interceptor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface PubrecOutboundInterceptor
extends Interceptor
Interface for the outbound PUBREC interception.

Interceptors are always called by the same Thread for all messages from the same client.

If the same instance is shared between multiple clients it can be called in different Threads and must therefore be thread-safe.

When the method onOutboundPubrec(PubrecOutboundInput, PubrecOutboundOutput) throws an exception or a call to PubrecOutboundOutput.async(Duration) times out with TimeoutFallback.FAILURE, HiveMQ will ignore this interceptor and will:

  1. Log the exception
  2. Revert the changes to the ModifiablePubrecPacket made by the interceptor
  3. Call the next PubrecOutboundInterceptor or send the PUBREC to the client if no interceptor is left
Since:
4.3.0, CE 2020.1