qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Kramer <j...@globalherald.net>
Subject Proper use of arguments and FieldTable isSet()
Date Thu, 23 Apr 2009 18:12:04 GMT

Hello,

Can someone please confirm if I am using the QPID_LOG function and 
FieldTable structures properly here?

I have a bit of Python code that declares a queue thusly:

replyQueue = session.queue_declare(queue=replyQueueName,
                                    exclusive=True,
                                    auto_delete=True,
                                    arguments={"secontext":"one:two:three"})

I can confirm that the arguments are being passed into the broker via this 
trace message:

2009-apr-23 12:46:22 debug
4722d3a8-94a6-ff4f-8390-39bd2122bed9@testuser1@QPID: recv cmd 0:
{QueueDeclareBody: 
queue=producerReply_4722d3a8-94a6-ff4f-8390-39bd2122bed9;
exclusive=1; auto-delete=1;
arguments={secontext:V2:13:vbin16(one:two:three)}; }

In the queue declare code, around line 330 of broker/SessionAdapter.cpp, I 
have this code:

 	QPID_LOG(debug, ": in SessionAdapter 330: checking for secontext");
         if (arguments.isSet("secontext"))
         {
             QPID_LOG(debug, ": in SessionAdapter 330: found secontext");
             std::string seContext = arguments.getAsString("secontext");
             QPID_LOG(debug, ": in SessionAdapter 330: secontext is: " <<
             seContext);
             params.insert(make_pair(acl::PROP_SECONTEXT, seContext ));
         }

There are a couple of problems here.  First, the QPID_LOG messages don't 
appear to run.  I'm running the broker with the -t command line option, as 
well as --log-enable debug:broker .  Next, the isSet does not appear to be 
finding the secontext argument.  Is it safe to assume that the arguments 
passed in to SessionAdapter::QueueHandlerImpl::declare are complete, as 
passed to the broker?  Or should I debug further up the path?

Thanks,
-Josh

-- 

-----
http://www.globalherald.net/jb01
GlobalHerald.NET, the Smarter Social Network! (tm)

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


Mime
View raw message