Interface Receiver

All Superinterfaces:
AutoCloseable, Channel, Flow.Publisher<Message>

public interface Receiver extends Channel, Flow.Publisher<Message>
Abstracts an incoming channel. Using the official reactive streams API implementation from the Java SDK.
Author:
Domenico Barra - domenico@adamantic.io
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    subscribe(String routing, Flow.Subscriber<? super Message> subscriber)
    Creates a new subscription for incoming messages over a specific routing key (i.e.

    Methods inherited from interface io.adamantic.quicknote.Channel

    close, name, open, state

    Methods inherited from interface java.util.concurrent.Flow.Publisher

    subscribe
  • Method Details

    • subscribe

      void subscribe(String routing, Flow.Subscriber<? super Message> subscriber) throws IOException
      Creates a new subscription for incoming messages over a specific routing key (i.e. not "all messages", just a part).
      Parameters:
      routing - the routing key to listen for
      subscriber - the message subscriber (i.e. the object that will receive the messages)
      Throws:
      IOException - if the subscription cannot be established