Comments (1)
Please find the test code snippet:
try
{
cout<<"Conn_Info:"<<connInfo<<endl;
//connInfo = ":@:5672/";
m_pamqp=new AMQP(connInfo,30); //AMQP modified to give timeout
m_prodexchange=m_pamqp->createExchange(m_exchangeName); //Exchange is predefined and durable
m_prodexchange->Declare(m_exchangeName, "direct",AMQP_DURABLE);
AMQPQueue * queue = m_pamqp->createQueue("TestMT1"); //TestMT1 is predefined durable queue
queue->Bind( m_exchangeName, m_routekey);
cout<<"m_prodexchange:"<<m_prodexchange<<endl;
/*Code to create queue with routing key[start]*/
/*Code to create queue with routing key[end]*/
initializeExHeader(RMQExHeader);
cout<<"RMQMessageProducer::publishMsg Sendng message:"<<message.c_str()
<<" with Routing key:"<<m_routekey.c_str()<<endl;
m_prodexchange->Publish(message ,m_routekey);
}catch(AMQPException e){
cout<<"Exception reply code:"<<e.getMessage()<<endl;
}
from amqpcpp.
Related Issues (20)
- Consumer is not working after some time HOT 2
- strerror in AMQPException::AMQPException in case of AMQP_RESPONSE_LIBRARY_EXCEPTION
- Doesn't this library support custom headers? HOT 1
- How to reduce memory usage after a transfer.
- How to consume multiple queues HOT 1
- Different consumers triggered when message came 1 queue HOT 1
- Is there any way to recover if the rabbitmq connection is lost during consume?
- Can I use the rabbimq federation feature? HOT 1
- Getting "AMQP cannot create socket" error
- Getting "Server connection error 530" error
- How to implement Reply to message using rabbitMQ Cpp library?
- Errors while building HOT 6
- class "amqp_bytes_t_" has no member "c_str" HOT 1
- void AMQPQueue::addEvent( AMQPEvents_e eventType, int (*event)(AMQPMessage*)) only accepts static functions
- How to confirm that the message is sent successfully HOT 2
- win64, static library compile error HOT 1
- Allow declaring a queue without specifying the name HOT 2
- Performance
- Include parameters in Queue despription HOT 1
- Crash observed while trying to fetch AMQP headers in rabbitmq-c 0.11.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amqpcpp.