Message handler

Basics of message handler

Constructor

  • (Integer) PacketID - Packet id of packet to be handled.

  • (String) ChannekName - NATS channel to be subscribed to.

  • (CountdownLatch) Latch - Latch for waiting for message to be received.

Handler for message

    @Override
    protected void onReceive(T s, Message message) {
        // Here u can handle message
    }

Last updated