update README.md

This commit is contained in:
Matt Broadstone 2015-01-19 14:33:27 -05:00
parent f2ac01de34
commit 883172368a
1 changed files with 107 additions and 117 deletions

194
README.md
View File

@ -3,115 +3,105 @@
QAMQP QAMQP
============= =============
Qt4/Qt5 implementation of AMQP 0.9.1. A Qt4/Qt5 implementation of AMQP 0.9.1, focusing primarily on RabbitMQ support.
Implement
------------
### Connection
work with socket connections
* start - start connection negotiation
* startok - select security mechanism and locale
* tune - propose connection tuning parameters
* tuneok - negotiate connection tuning parameters
* open - open connection to virtual host
* openok - signal that connection is ready
* close - request a connection close
* closeok - confirm a connection close
### Channel
work with channels
* open - open a channel for use
* openok - signal that the channel is ready
* close - request a channel close
* closeok - confirm a channel close
### Exchange
work with exchanges
* declare - verify exchange exists, create if needed
* declareok - confirm exchange declaration
* delete - delete an exchange
* deleteok - confirm deletion of an exchange
### Queue
work with queues
* declare - declare queue, create if needed
* declareok - confirms a queue definition
* bind - bind queue to an exchange
* bindok - confirm bind successful
* unbind - unbind a queue from an exchange
* unbindok - confirm unbind successful
* purge - purge a queue
* purgeok - confirms a queue purge
* delete - delete a queue
* deleteok - confirm deletion of a queue
### Basic
work with basic content
* qos - specify quality of service
* qosok - confirm the requested qos
* consume - start a queue consumer
* consumeok - confirm a new consumer
* publish - publish a message
* deliver - notify the client of a consumer message
* get - direct access to a queue
* getok - provide client with a message
* getempty - indicate no messages available
* ack - acknowledge one or more messages
Usage Usage
------------ ------------
* [hello world](https://github.com/mbroadst/qamqp/tree/master/tutorials/helloworld)
* [pubsub](https://github.com/mbroadst/qamqp/tree/master/tutorials/pubsub)
* [routing](https://github.com/mbroadst/qamqp/tree/master/tutorials/routing)
* [rpc](https://github.com/mbroadst/qamqp/tree/master/tutorials/rpc)
* [topics](https://github.com/mbroadst/qamqp/tree/master/tutorials/topics)
* [work queues](https://github.com/mbroadst/qamqp/tree/master/tutorials/workqueues)
Test::Test() Documentation
{ ------------
QUrl con(QString("amqp://guest:guest@localhost:5672/")); Coming soon!
client_ = new QAMQP::Client(this);
connect(client_, SIGNAL(connected()), this, SLOT(connected()));
client_->open(con);
exchange_ = client_->createExchange("test.test2");
queue_ = client_->createQueue("test.my_queue", exchange_->channelNumber());
connect(queue_, SIGNAL(declared()), this, SLOT(declared()));
connect(queue_, SIGNAL(messageReceived(QAMQP::Queue * )), this, SLOT(newMessage(QAMQP::Queue *)));
} AMQP Support
------------
void Test::connected() #### connection
{ | method | supported |
exchange_->declare("fanout"); | --- | --- |
queue_->declare(); | connection.start | ✓ |
exchange_->bind(queue_); | connection.start-ok | ✓ |
} | connection.secure | ✓ |
| connection.secure-ok | ✓ |
| connection.tune | ✓ |
| connection.tune-ok | ✓ |
| connection.open | ✓ |
| connection.open-ok | ✓ |
| connection.close | ✓ |
| connection.close-ok | ✓ |
void Test::declared() #### channel
{ | method | supported |
exchange_->publish("Hello world", exchange_->name()); | ------ | --------- |
queue_->setQOS(0,10); | channel.open | ✓ |
queue_->setConsumerTag("qamqp-consumer"); | channel.open-ok | ✓ |
queue_->consume(QAMQP::Queue::coNoAck); | channel.flow | ✓ |
} | channel.flow-ok | ✓ |
| channel.close | ✓ |
| channel.close-ok | ✓ |
#### exchange
| method | supported |
| ------ | --------- |
| exchange.declare | ✓ |
| exchange.declare-ok | ✓ |
| exchange.delete | ✓ |
| exchange.delete-ok | ✓ |
#### queue
| method | supported |
| ------ | --------- |
| queue.declare | ✓ |
| queue.declare-ok | ✓ |
| queue.bind | ✓ |
| queue.bind-ok | ✓ |
| queue.unbind | ✓ |
| queue.unbind-ok | ✓ |
| queue.purge | ✓ |
| queue.purge-ok | ✓ |
| queue.delete | ✓ |
| queue.delete-ok | ✓ |
#### basic
| method | supported |
| ------ | --------- |
| basic.qos | ✓ |
| basic.consume | ✓ |
| basic.consume-ok | ✓ |
| basic.cancel | ✓ |
| basic.cancel-ok | ✓ |
| basic.publish | ✓ |
| basic.return | ✓ |
| basic.deliver | ✓ |
| basic.get | ✓ |
| basic.get-ok | ✓ |
| basic.get-empty | ✓ |
| basic.ack | ✓ |
| basic.reject | ✓ |
| basic.recover | ✓ |
#### tx
| method | supported |
| ------ | --------- |
| tx.select | X |
| tx.select-ok | X |
| tx.commit | X |
| tx.commit-ok | X |
| tx.rollback | X |
| tx.rollback-ok | X |
#### confirm
| method | supported |
| ------ | --------- |
| confirm.select | ✓ |
| confirm.select-ok | ✓ |
void Test::newMessage(QAMQP::Queue * q)
{
while (q->hasMessage())
{
QAMQP::MessagePtr message = q->getMessage();
qDebug("+ RECEIVE MESSAGE");
qDebug("| Exchange-name: %s", qPrintable(message->exchangeName));
qDebug("| Routing-key: %s", qPrintable(message->routeKey));
qDebug("| Content-type: %s", qPrintable(message->property[QAMQP::Frame::Content::cpContentType].toString()));
if(!q->noAck())
{
q->ack(message);
}
}
}
Credits Credits
================ ------------
Thank you [@mdhooge](https://github.com/mdhooge) for tutorials inspired by https://github.com/jonnydee/nzmqt * Thank you to [@fuCtor](https://github.com/fuCtor) for the original implementation work.
[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/fda6b79d2e88186cba0c70e204c4f10b "githalytics.com")](http://githalytics.com/fuCtor/QAMQP)