Wrapped immutable array of Bytes, produces a defensive copy of the passed array
Operation to perform on an amqp channel, the underlying connection may fail and be replaced by a new one with the same parameters
Closeable for a handler of RPCs, close to stop the handler from being called
Holds a connection, the underlying connection may be replaced if it fails
The message and any routing information that is included when it is received from a queue.
Describes an exchange which should already exist, an error will be thrown on use if it does not
Call to send Acks to Messages
Message blob with content headers
Defines a queue to connect to or create
Parameters to create a new queue
Describes an exchange which should already exist, an error is thrown if it does not
RPC method over AMQP.
Specifies routing and send parameters
The queue server found nowhere to route the message
Produces an immutable array of bytes
Create a connection using the builder:
DeliveryMode is a header on AMQP messages.
Some basic strategies for handling events
Message blob with content headers, usually you would use the child objects to construct / extract different types of messages
Strategies for reconnection, currently only fixed delay or no reconnection are available
Some options for when the server will Ack the request message, clients only have the AckOnReceive auto Ack strategy
Scala wrapper for interacting with AMQP, the aim is for convenient: - scala style usage - RPC calls - event hooks - reconnection strategies - message creation and extraction for common message types
Overview
Build connections with io.relayr.amqp.ConnectionHolder.builder
Create a connection:
Create a channel:
val channel = connection.newChannel()Create an RPC server listening on queue "queue.name", expecting a String and echoing it back:
Create an RPC client method which sends requests to the queue "queue.name" with a response timeout of 10 seconds :
Create a consumer on "queue.name" printing out strings sent to it:
Send a message to "queue.name":