qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Robie <jonathan.ro...@redhat.com>
Subject Python, C++: Connecting, creating a session
Date Wed, 11 Feb 2009 17:02:40 GMT
C++ seems simpler and cleaner to me here. You create a Connection 
object, open it, then use it to create a Session object:


Connection connection;

try {
   connection.open(host, port);
   Session session =  connection.newSession();

Python is more complex, because it requires:

    * a socket object
    * connection.start()
    * a unique identifier that I specify


socket = connect(host, port)
connection = Connection (sock=socket, username=user, password=password)
session = connection.session(str(uuid4()))

Should we make the Python API ape C++ here?


Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org

View raw message