C + + librabbitmq wrapper for the
- 资源大小:19.59 kB
- 上传时间:2021-06-30
- 下载次数:0次
- 浏览次数:1次
- 资源积分:1积分
-
标 签:
资 源 简 介
rabbitcpp is a C++ library for Message Queue Server RabbitMQ (http://www.rabbitmq.com/) and support the AMQP (Advanced Message Queuing Protocol http://en.wikipedia.org/wiki/AdvancedMessageQueuing_Protocol ). The C++ library is using the C-rabbitmq client library (http://hg.rabbitmq.com/rabbitmq-c/).
Example Publish
```
#include "amqpcpp.h"
#include
#include
int main (int argc, char** argv) {
try {
AMQP amqp;
AMQPExchange * ex = amqp.createExchange("e");
ex->Declare("e", "direct");
AMQPQueue * qu2 = amqp.createQueue("q2");
qu2->Declare();
qu2->Bind( "e", "msg");
string ss = "message 1 ";
/* test very long message
ss = ss+ss+ss+ss+ss+ss+ss;
ss += ss+ss+ss+ss+ss+ss+ss;
ss += ss+ss+ss+ss+ss+ss+ss;
ss += ss+ss+ss+ss+ss+ss+ss;
ss += ss+ss+ss+ss+ss+ss+ss;
*/
<
文 件 列 表
dist
.DS_Store
AMQPBase.cpp
AMQPConnection.cpp
amqpcpp.h
AMQPException.cpp
AMQPExchange.cpp
AMQPMessage.cpp
AMQPQueue.cpp
CHANGELOG
example_consume.cpp
example_get.cpp
example_publish.cpp
Makefile