trait RabbitMQUtilAsync extends AnyRef
Inheriting from this trait provides useful methods to interact with RabbitMQ using akka Actors.
- Annotations
- @deprecated
- Deprecated
(Since version 0.3.0) Classes mixing in RabbitMQUtilAsync should instead use an AmqpClient instance
- Alphabetic
- By Inheritance
- RabbitMQUtilAsync
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- lazy val connectionOwner: ActorRef
-
def
createProducer(handlerActor: Option[ActorRef]): ActorRef
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.
- handlerActor
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.
- returns
the actor ref of the producer
-
def
createRpcClient(handlerActor: Option[ActorRef] = None): Future[ActorRef]
Create a rpc client
Create a rpc client
- handlerActor
the actor to handle the channel state; it can receive the messages
- returns
the rpc client actor ref
-
def
createRpcServer(exchangeName: String, routingKey: String, queueName: Option[String] = None, handlerActor: Option[ActorRef] = None, timeout: Option[FiniteDuration] = None)(server: (Delivery) ⇒ Future[ProcessResult])(implicit ec: ExecutionContext): Future[String]
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).
- exchangeName
the exchange name
- routingKey
the routing key
- queueName
the queue name
- handlerActor
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.
- timeout
an optional message timeout to avoid filling up the queue with old, already ignored, responses
- server
the function that processes an Delivery
- ec
the implicit execution context
- returns
the future with the queue name
-
def
createStashedProducer(): ActorRef
Creates a producer which stashes messages until the producer is fully connected to AMQP.
Creates a producer which stashes messages until the producer is fully connected to AMQP.
- returns
the actor ref of the producer proxy.
-
def
declareExchange(exchangeName: String, exchangeType: String = "topic", handlerActor: Option[ActorRef] = None): Future[Unit]
Declare an exchange asynchronously.
Declare an exchange asynchronously. When the broker has a connection to the channel, the exchange will be declared.
- exchangeName
the exchange name
- exchangeType
the exchange type
- handlerActor
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.
- returns
the future that completes this exchange declaration
-
def
declareQueue(exchangeName: String, routingKey: String, queueName: Option[String] = None, handlerActor: Option[ActorRef] = None, clientFacing: Boolean = false): Future[String]
Declare a queue asynchronously.
Declare a queue asynchronously. When the broker has a connection to the channel, the queue will be declared.
- exchangeName
the exchange name
- routingKey
the routing key
- queueName
the queue name, pass None to generate one randomly
- handlerActor
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.
- clientFacing
true if the queue will be read by an external client
- returns
the future with the queue name
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
setListeningConsumer(actor: ActorRef, exchangeName: String, routingKey: String, queueName: Option[String] = None, autodelete: Boolean = true, handlerActor: Option[ActorRef] = None, clientFacing: Boolean = false): Future[(ActorRef, String)]
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.
- actor
the actor which will listen to the queue
- exchangeName
the exchange name
- routingKey
the routing key
- queueName
the queue name, pass None to generate one randomly
- autodelete
if true, the queue will be destroyed when it is no longer used
- handlerActor
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.
- clientFacing
true if the queue will be read by an external client
- returns
the future with the consumer actor and the queue name
-
def
setListeningQueue(actor: ActorRef, exchangeName: String, routingKey: String, queueName: Option[String] = None, autodelete: Boolean = true, handlerActor: Option[ActorRef] = None, clientFacing: Boolean = false): Future[String]
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.
- actor
the actor which will listen to the queue
- exchangeName
the exchange name
- routingKey
the routing key
- queueName
the queue name, pass None to generate one randomly
- autodelete
if true, the queue will be destroyed when it is no longer used
- handlerActor
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.
- clientFacing
true if the queue will be read by an external client
- returns
the future with the queue name
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )