HI!
  Now I use the c++ API for version 0.34, but I have some questions about
session;  
  I create one receive and one sender by the same session,so is it thread
safe to send message and fetch message in different thread? 
 
example code:
        int main()
       {
           Connection connection(broker, options);
           connection.open();
           Session session = connection.createSession();
           Receiver receiver = session.createReceiver(address);
           Sender sender = session.createSender(address);
           return 1;
       }

       int SendThread()    // send thread
      {
             while(true)
             {
                    sender.send(Message("Hello world!"));
             }
      }

     int RecvProc()    // recv thread
      {
             while(true)
             {
                     Message message = receiver.fetch(Duration::SECOND);
             }
      }
       




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-session-thread-safe-tp7650570.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to