Crate metalmq_client[−][src]
Client of metalmq.
Usage
use metalmq_client::*; async fn client() -> Result<()> { let client = connect("127.0.0.1:5672").await?; client.open("/").await?; client.channel_open(1).await?; client.basic_publish(1, "exchange", "routing", "Hello".into()).await?; client.close().await?; Ok(()) }
Modules
client |
Macros
client_error | Shorthand for creating errors in async functions. |
Structs
Client | Represents a connection to AMQP server. It is not a trait since async functions in a trait are not yet supported. |
ClientError | Represents a connection or channel error. If |
Message | Message type for consuming messages. |
Functions
connect | Connect to an AMQP server. |
setup_logger | Convenience function for setting up |
Type Definitions
Channel | AMQP channel number |
ClassId | AMQP method class id |
ClassMethod | AMQP class id method id number |
Error | A sendable, syncable boxed error, usable between async threads. |
MessageSink | Interface for consuming messages. |
Result | Custom error type which uses |