I was using the Address constructor

Address(const std::string& name, const std::string& subject,
                               const qpid::types::Variant::Map& options,
const std::string& type = "");

to provide the name and options. It seems the behaviour is not the same
though as your method also works for me. Problem solved, thanks very much :)

C

On 26 August 2017 at 14:30, Jakub Scholz <ja...@scholz.cz> wrote:

> How exactly do you create the address and what do you have in you client /
> broker log?
>
> When I try to do something like this:
>     Address myAddress;
>     Variant::Map options;
>     Variant::Map selector;
>     selector["selector"] = "color='blue'";
>     options["link"] = selector;
>     Variant::Map node_type;
>     node_type["type"] = "queue";
>     options["node"] = node_type;
>     options["assert"] = "always";
>     myAddress.setOptions(options);
>     myAddress.setName("myTest");
>
> For me it seems to work properly. The client log correctly creates the
> address:
>     2017-08-26 13:28:14 [Client] debug treating source address as queue:
> myTest;{assert:always, link:{selector:color='blue'}, node:{type:queue}}
> The client sends only QueueDeclare and QueueQuery and the only ACL right
> needed seem to be queue/access and queue/consume.
>
> Regards
> Jakub
>
> On Sat, Aug 26, 2017 at 1:08 PM, Chris Richardson <c...@fourc.eu> wrote:
>
> > Hi,
> >
> > Using the qpid-cpp-1.36 broker/client I am trying to specify two clauses
> on
> > a receiver node (queue) address; one is a selector and looks something
> like
> > this:
> >
> > Variant::Map options;
> > Variant::Map selector;
> > selector["selector"] = "<some selector string>";
> > options["link"] = selector;
> >
> > the other is a node type specification and looks like
> >
> > Variant::Map node_type;
> > node_type["type"] = "queue";
> > options["node"] = node_type; // using "options" from previous example
> > options["assert"] = "always";
> >
> > Either one of these works on their own, but when combined the second
> clause
> > seems to be ignored and an attempt to access the queue name as an
> exchange
> > is made, which gets denied by the ACL.
> >
> > Am I doing something nonsensical like trying to combine
> > AMQP-0.10/AMQP-1.0/JMS grammar? Ref:
> > https://qpid.apache.org/releases/qpid-cpp-1.36.0/
> > messaging-api/book/section-addresses.html,
> > it appears that the "selector" keyword does not exist at all - my use of
> > this is based on this previous question
> > http://qpid.2158936.n2.nabble.com/Property-names-in-
> > subscription-selectors-td7625162.html#a7625166
> > (and nested links).
> >
> > Some clarification would be much appreciated!
> >
> > Chris
> >
> > --
> >
> > *Chris Richardson*, System Architect
> > c...@fourc.eu
> >
> >
> > *FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller,
> Norwaywww.fourc.eu
> > <http://www.fourc.eu/>*
> >
> > *Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
> > <http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
> > <http://bit.ly/fourctw>!*
> >
>



-- 

*Chris Richardson*, System Architect
c...@fourc.eu


*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*

*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*

Reply via email to