Queue gets deleted
Queue gets deleted automatically , when the c++ executable are idle for more than a day. So all the requests to that queue gets timed out . A sample function code pasted below.
Channel::ptr_t channel=Channel::Create("127.0.0.1",5672,"guest","guest","/"); channel->DeclareQueue("db_fetch_user_cred",false,true,false,false); channel->BindQueue("db_fetch_user_cred", "amq.direct", "db_fetch_user_cred"); string tag = channel->BasicConsume("db_fetch_user_cred", "",true,false,false); while(1) { Envelope::ptr_t envelope = channel->BasicConsumeMessage(tag); BasicMessage::ptr_t msg_in = envelope->Message(); cout<<" Got Fetch User Details Request "<<endl; string input = msg_in->Body(); string replyTo = msg_in->ReplyTo(); string correlationId = msg_in->CorrelationId(); channel->BasicAck(envelope); MsgQueue::ioServiceForWorkers.post(boost::bind(_dbFetchUserCredentials, this,input)); }
hi have you solved this issue yet?