docs.rs failed to build amqp-0.0.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
amqp-0.1.3
AMQ protocol implementation in pure rust.
Note: The project is still in very early stages of development, it implements all the protocol parsing, but not all the protocol methods are wrapped/easy to use. Expect the API to be changed in the future.
What it currently can do:
- Connect to server
- Open/close channels
- Declare queues/exchanges
- All the methods from the Basic class are implemented, including get, publish, ack, nack, reject, consume. So you can send/receive messages.
Have a look at the examples in examples folder.
Connecting to the server & openning channel:
Note: Currently it can't connect using TLS connections.
extern crate amqp;
use Session;
use table;
let mut session = open_url.unwrap;
let mut channel = session.open_channel.unwrap;
Declaring queue:
//The arguments come in following order:
//queue: &str, passive: bool, durable: bool, exclusive: bool, auto_delete: bool, nowait: bool, arguments: Table
let queue_declare = channel.queue_declare;
Publishing message:
channel.basic_publish;
This will send message: "Hello from rust!" to the queue named "my_queue_name".
The messages have type of Vec, so if you want to send string, first you must convert it to Vec.
Development notes:
The methods encoding/decoding code is generated using codegen.rb & amqp-rabbitmq-0.9.1.json spec.
To generate a new spec, run:
To build project, use cargo:
To build examples: