eu.shiftforward.adstax.tracking
a Props
encapsulating the creation of worker actors
the number of worker actors to instantiate
the RabbitMQ configuration
the tracking configuration
Extracts a JsObject
from an Amqp Delivery
message.
Extracts a JsObject
from an Amqp Delivery
message.
Usage:
amqpDelivery match { case AmqpDeliveryJsObject(json) => json.convertTo[Something] case Delivery(_, _, _, bodyInBytes) => // will only match if the message is not a valid json object }
Extracts a String
from an Amqp Delivery
message.
Extracts a String
from an Amqp Delivery
message.
Usage:
amqpDelivery match { case AmqpDeliveryString(string) => println(string) }
Converts a AmqpPublishJsObject
that receives a JsObject
, to an Amqp.Publish
.
Converts a AmqpPublishJsObject
that receives a JsObject
, to an Amqp.Publish
.
Converts a AmqpPublishString
that receives a String
, to an Amqp.Publish
.
Converts a AmqpPublishString
that receives a String
, to an Amqp.Publish
.
The ActorRef
factory, such as an ActorSystem
or ActorContext
, used to create the actors needed for tracking.
The ActorRef
factory, such as an ActorSystem
or ActorContext
, used to create the actors needed for tracking.
Creates a producer.
Creates a producer. When the broker has a connection to the channel, the handler actor will be notified that the producer is connected.
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected or a com.github.sstone.amqp.Amqp.Error.
the actor ref of the producer
Create a rpc client
Create a rpc client
the actor to handle the channel state; it can receive the messages
the rpc client actor ref
Setup a RpcServer asynchronously.
Setup a RpcServer asynchronously. When the broker has a connection to the channel, the exchange and queues are declared and then it will start to process incoming messages.
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 queue name
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected or a 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 an Delivery
the implicit execution context
the future with the queue name
Creates a producer which stashes messages until the producer is fully connected to the rmq.
Creates a producer which stashes messages until the producer is fully connected to the rmq.
the actor ref of the producer proxy.
Declare an exchange asynchronously.
Declare an exchange asynchronously. When the broker has a connection to the channel, the exchange will be declared.
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 or a com.github.sstone.amqp.Amqp.Error.
the future that completes this exchange declaration
Declare a queue asynchronously.
Declare a queue asynchronously. When the broker has a connection to the channel, the queue will be declared.
the exchange name
the routing key
the queue name, pass None to generate one randomly
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected or a com.github.sstone.amqp.Amqp.Error.
true if the queue will be read by an external client
the future with the queue name
The name of the AMQP exchange from which the listener will consume events.
The name of the AMQP exchange from which the listener will consume events.
the number of worker actors to instantiate
the number of worker actors to instantiate
a Props
encapsulating the creation of worker actors
a Props
encapsulating the creation of worker actors
the RabbitMQ configuration
the RabbitMQ configuration
The routing key from which the listener will consume events.
The routing key from which the listener will consume events.
Bind a specific queue to a given actor asynchronously.
Bind a specific queue to a given actor asynchronously. When the broker has a connection to the channel, the queue is declared and bound to the given actor.
the actor which will listen to the queue
the exchange name
the routing key
the queue name, pass None to generate one randomly
if true, the queue will be destroyed when it is no longer used
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected or a com.github.sstone.amqp.Amqp.Error.
true if the queue will be read by an external client
the future with the consumer actor and the queue name
Bind a specific queue to a given actor asynchronously.
Bind a specific queue to a given actor asynchronously. When the broker has a connection to the channel, the queue is declared and bound to the given actor.
the actor which will listen to the queue
the exchange name
the routing key
the queue name, pass None to generate one randomly
if true, the queue will be destroyed when it is no longer used
the actor to handle the channel state; it can receive the messages com.github.sstone.amqp.ChannelOwner.Disconnected, com.github.sstone.amqp.ChannelOwner.Connected or a com.github.sstone.amqp.Amqp.Error.
true if the queue will be read by an external client
the future with the queue name
the tracking configuration
the tracking configuration
An actor able to consume tracking events from an AdStax Event Tracker instance.