Interface PubcompOutboundInterceptor
-
- 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 PubcompOutboundInterceptor extends Interceptor
Interface for the outbound PUBCOMP 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
onOutboundPubcomp(PubcompOutboundInput, PubcompOutboundOutput)
throws an exception or a call toPubcompOutboundOutput.async(Duration)
times out withTimeoutFallback.FAILURE
, HiveMQ will ignore this interceptor and will:- Log the exception
- Revert the changes to the
ModifiablePubcompPacket
made by the interceptor - Call the next
PubcompOutboundInterceptor
or send the PUBCOMP to the client if no interceptor is left
- Since:
- 4.3.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onOutboundPubcomp(@NotNull PubcompOutboundInput pubcompOutboundInput, @NotNull PubcompOutboundOutput pubcompOutboundOutput)
When aPubcompOutboundInterceptor
is set through any extension, this method gets called for every outgoing PUBCOMP packet for any MQTT client.
-
-
-
Method Detail
-
onOutboundPubcomp
void onOutboundPubcomp(@NotNull PubcompOutboundInput pubcompOutboundInput, @NotNull PubcompOutboundOutput pubcompOutboundOutput)
When aPubcompOutboundInterceptor
is set through any extension, this method gets called for every outgoing PUBCOMP packet for any MQTT client.When the extension is enabled after HiveMQ is already running, this method will also be called for future PUBCOMPs for clients that are already connected.
- Parameters:
pubcompOutboundInput
- ThePubcompOutboundInput
parameter.pubcompOutboundOutput
- ThePubcompOutboundOutput
parameter.- Since:
- 4.3.0, CE 2020.1
-
-