Joshua Kramer wrote:

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-39bd2122b...@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 .

The -t option should be sufficient (it implies that all debug statements are logged). Are you saying that even the "checking for secontext" message does not show up? That suggests to me perhaps some test procedure error (e.g. are you sure the broker you are running has been compiled with that statement in it).

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?

Yes.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to