A trait that extends a rmq publisher and implements a common pattern where all received messages are stashed until the underlying producer is created and connected.
Inheriting from this trait provides useful methods to interact with RabbitMQ using akka Actors.
This trait abstracts the creation and communication logic of a Rpc client.
Describes the evidence of the expected response type from a given request
Describes the evidence of the expected response type from a given request
the type of the request message with a JsonWriter
the response type that the callback returns
The Json Routing Key for a specific type.
The Json Routing Key for a specific type.
the type which the routing key refers to
A trait that extends a rmq publisher and implements a common pattern where all received messages are stashed until the underlying producer is created and connected.
Mixing in this class requires defining the
producerConnected
method that should contain all the logic of publishing to rmq and can assume all is ready for publishing, as well as defining thesetupRmq
method which should create the producer actor. Another aspect of using this trait is that instead of using "context.become(newReceive)", one should use "stashedContextBecome(newReceive)" so that producer disconnected handling behaviour is not lost while changing context.