[rabbitmq-discuss] rabbitmq-c connection block

3k4b251 314992959 at qq.com
Fri Jun 14 10:19:42 BST 2013


ok.  for example. 

this's  a  thread, we  receive  message from it.
   msg_receive(LPVOID  lpParameter){
       
      amqp_connection_state_t  conn =  (amqp_connection_state_t)lpParameter;

      amqp_frame_t    frame;      
     
      int result;

    result = amqp_simple_wait_frame(conn, &frame);     //block  here
     ......................... // omit  the process of  receive
     ........................ 
}

void main(){
      amqp_connection_state_t  conn  =amqp_new_connection();
     ...............................  // omit the process of  connect
     ...............................
     // I  start the  thread ,  and  it  block  in 
amqp_simple_wait_frame();
     _beginthread(msg_receive,0,this);
    
    //so  next  i  wan declare  a  queue
    amqp_queue_declare(conn,......);  //but  i  find  it  block.  so i can't 
do anything  after.


 amqp_exchange_declare(); amqp_basic_consume(); have the same  problem too. 
I  guess  every  function with  the  parameter  of conn  just block.  
what's  the problem?
    
     

}





--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-connection-block-tp27297p27389.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list