the AMQP broker config
a namespace which all queues created without a name will have
Declares a queue, binds it to an exchange and routing key and adds a consumer to it.
Declares a queue, binds it to an exchange and routing key and adds a consumer to it.
the actor which will consume com.github.sstone.amqp.Amqp.Delivery messages
the exchange name
the routing key
the underlying queue name wrapped in a Some
, or None
to generate one with a random suffix
true
if the queue should be destroyed when it is no longer used, false
otherwise
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
true
if the queue will be read by an AdStax-external client, false
otherwise
a Future
that is completed with the queue name when the consumer is successfully added.
Declares a queue, binds it to an exchange and routing key and adds a consumer to it.
Declares a queue, binds it to an exchange and routing key and adds a consumer to it. Returns additionally the underlying actor doing the binding, which can be killed later to stop the consumption of AMQP messages.
the actor which will consume com.github.sstone.amqp.Amqp.Delivery messages
the exchange name
the routing key
the underlying queue name wrapped in a Some
, or None
to generate one with a random suffix
true
if the queue should be destroyed when it is no longer used, false
otherwise
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
true
if the queue will be read by an AdStax-external client, false
otherwise
a Future
that is completed with the underlying binding actor and the queue name when the consumer is
successfully added.
Creates a producer actor.
Creates a producer actor. Producer actors can be sent com.github.sstone.amqp.Amqp.Publish, which they dispatch to the AMQP broker. The created actor will discard publish messages that are sent at a time in which the client is disconnected from the broker.
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
the ActorRef
of the producer.
Creates an RPC client.
Creates an RPC client.
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
a Future
that is completed with the RPC producer actor when it is successfully bound.
Sets up an RPC server.
Sets up an RPC server. The server starts processing incoming messages sent to an exchange and routing key and replies to them according to a given behavior.
The queue name can be None
to create a One-To-Many (all servers/processors handle the request) or specified
for a One-To-Any (only one server/processor will handle the request).
the exchange name
the routing key
the underlying queue name wrapped in a Some
for One-To-Any behavior, or None
to generate one
with a random suffix for One-To-Many behavior
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
an optional message timeout to avoid filling up the queue with old, already ignored, responses
the function that processes Delivery
messages and returns the reply for each one of them
a Future
that is completed with the queue name when the server is started.
Creates a producer actor which stashes messages until the producer is fully connected to the AMQP broker.
Creates a producer actor which stashes messages until the producer is fully connected to the AMQP broker. Producer actors can be sent com.github.sstone.amqp.Amqp.Publish, which they dispatch to the AMQP broker.
the ActorRef
of the producer.
Declares an exchange.
Declares an exchange.
the exchange name
the exchange type
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
a Future
that is completed when the exchange is successfully declared.
Declares a queue and binds it to an exchange and routing key.
Declares a queue and binds it to an exchange and routing key.
the exchange name to bind the queue to
the routing key to bind the queue to
the queue name wrapped in a Some
, or None
to generate one with a random suffix
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected and com.github.sstone.amqp.Amqp.Error
true
if the queue will be read by an AdStax-external client, false
otherwise
a Future
that is completed with the queue name when the queue is successfully bound.
The ExecutionContext
used by this client to schedule asynchronous tasks.
An AMQP client simplifying some of the common interactions with AMQP brokers. It handles correctly cases in which the broker is not reachable at the time operations are done, waiting for a connection to be established first.