Python and C++ clients behave differently
-----------------------------------------
Key: QPID-3456
URL: https://issues.apache.org/jira/browse/QPID-3456
Project: Qpid
Issue Type: Bug
Components: C++ Client, Python Client
Affects Versions: 0.13
Reporter: Tomas Soltys
Priority: Minor
Python and C++ clients sends different commands to the broker.
Address:
response/response.QPID_CLIENT.response_queue_1;
{
create: receiver,
link:
{
name: 'response.QPID_CLIENT.response_queue_1',
durable: false,
x-declare:
{
auto-delete: true,
exclusive: true,
arguments:
{
'qpid.max_count': 1000,
'qpid.max_size': 1000000,
'qpid.policy_type': ring
}
}
}
}
I have set the log level to trace+ on my broker and here is what I got from the
log when I have used the same same addres for python as well as for c++ client.
Python:
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 0:
{ExchangeQueryBody: name=response; }
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 1:
{QueueQueryBody: queue=response; }
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 2:
{QueueDeclareBody: queue=response.QPID_CLIENT.response_queue_1; exclusive=1;
auto-delete=1;
arguments={qpid.max_count:F8:int64(1000),qpid.max_size:F8:int64(1000000),qpid.policy_type:V2:4:str16(ring)};
}
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 3:
{ExchangeBindBody: queue=response.QPID_CLIENT.response_queue_1;
exchange=response; binding-key=response.QPID_CLIENT.response_queue_1; }
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 4:
{MessageSubscribeBody: queue=response.QPID_CLIENT.response_queue_1;
destination=0; accept-mode=0; acquire-mode=0; }
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 5:
{MessageSetFlowModeBody: destination=0; flow-mode=0; }
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 6:
{MessageCancelBody: destination=0; }
2011-08-26 12:13:08 trace
[email protected]:0: recv cmd 7:
{QueueDeleteBody: queue=response.QPID_CLIENT.response_queue_1; }
C++:
2011-08-26 12:15:48 trace
[email protected]: recv cmd 0:
{ExecutionSyncBody: }
2011-08-26 12:15:48 trace
[email protected]: recv cmd 1:
{ExchangeQueryBody: name=response; }
2011-08-26 12:15:48 trace
[email protected]: recv cmd 2:
{ExchangeDeclareBody: exchange=response; type=topic; alternate-exchange=;
arguments={}; }
C++ client will get 'ACL denied exchange declare request from
QPID_CLIENT@QPID9999' from the broker.
So to make the C++ client to be able to pass through I had to change the adress
as followed:
response/response.QPID_CLIENT.response_queue_1;
{
assert: never,
create: never,
node :
{
type: topic
},
link:
{
name: 'response.QPID_CLIENT.response_queue_1',
durable: false,
x-declare:
{
auto-delete: true,
exclusive: true,
arguments:
{
'qpid.max_count': 1000,
'qpid.max_size': 1000000,
'qpid.policy_type': ring
}
}
}
}
And I had to add two ACL rules:
acl allow members create exchange name=response passive=true
acl allow QPID_CLIENT@QPID9999 create queue name=response.QPID_CLIENT.*
passive=true
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]