Interface PublishInboundInterceptor

  • 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 PublishInboundInterceptor
    extends Interceptor
    Interface for the publish inbound 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.

    Since:
    4.0.0, CE 2019.1
    • Method Detail

      • onInboundPublish

        void onInboundPublish​(@NotNull PublishInboundInput publishInboundInput,
                              @NotNull PublishInboundOutput publishInboundOutput)
        When a PublishInboundInterceptor is set through any extension, this method gets called for every inbound PUBLISH packet from any MQTT client.

        When the extension is enabled after HiveMQ is already running, this method will also be called for future PUBLISHes of clients that are already connected.

        Parameters:
        publishInboundInput - The PublishInboundInput parameter.
        publishInboundOutput - The PublishInboundOutput parameter.
        Since:
        4.0.0, CE 2019.1