On 02/15/2010 05:52 PM, Cajus Pollmeier wrote:
Hmm. Looks like the specs declare an user-id in the message-properties. The
python docs don't tell me much about session.message_properties() and possible
methods.
Is there a way to get it?
You can get information on the various properties using pythons help
mechanism and an interactive python session. (import qpid.session, then
help(qpid.session.Session)). That will include information on the
methods and properties available (most of the text is taken from the
amqp xml spec).
msg.get("message_properties").userid lets you get at the userid (I
believe msg["message_properties"].userid would do the same.
Btw, you may also want to look at the higher level api in
qpid.messaging. It aims to abstract a lot of the protocol details making
it easier to use and more future proof.
Am 15.02.2010 um 10:55 schrieb Cajus Pollmeier:
Hi,
sorry for the badly chosen subject - I'm new to the world of amqp/qpid and I'm
playing with the python stuff in the moment. While digging around, I ran into a
couple of questions:
The python examples offer a .body element for messages, where I can get the
message body. How can I find out which SASL user sent the message?
Alternatively: for qpid, there's an ACL module. I'm authenticating against LDAP
and I'd like to use dynamic groups in order to define ACLs depending on a small
number of groups. In my case, I'd like to store groups inside of my LDAP tree
and not statically defined in my qpid policy file. Is it possible to get this
kind of behavior without creating an additional ACL module?
And one python thingie: what would be the preferred way to use a python library
inside a threaded environment? I've seen that there's a twisted integrated non
qpid library for that, but I can't get it up and running with qpid.
Thanks,
Cajus
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]