You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In rabbitmq server i have predefined Exchange and Queue. Do we need to call createExchange() and createQueue() to get exchange and queue pointers? Currently i am using createExchange() and createQueue() for the predefined exchange and queues. Does it overwrite the existing exchange and queue? If my usage is wrong then what is correct way of getting exchange and queue pointer for predefined exchange and queues.[Please note as per requirement queues are durable.]
The text was updated successfully, but these errors were encountered:
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;
}
Hi,
In rabbitmq server i have predefined Exchange and Queue. Do we need to call createExchange() and createQueue() to get exchange and queue pointers? Currently i am using createExchange() and createQueue() for the predefined exchange and queues. Does it overwrite the existing exchange and queue? If my usage is wrong then what is correct way of getting exchange and queue pointer for predefined exchange and queues.[Please note as per requirement queues are durable.]
The text was updated successfully, but these errors were encountered: