Hi Daniel,

It looks to me like you've almost answered your own question, or perhaps
that I've misunderstood it... however I'll forge ahead regardless!

I have some code which does this here:
See line 532, "sendMessage". If you look past the Boost details you'll see
that it passes the node type in the sender address exactly as you have
specified with spout.

There is a second way to provide address attributes by passing a nested
Variant::Map structure to the address. This has been useful to me when
using other address attributes such as a link selector. I don't have an
example of this I can readily share but the pseudo-code might look
something like:

qpid::messaging::Session session;     // = connection.createSession etc
qpid::messaging::Message message; // the message to be sent

qpid::messaging::types::Variant::Map node_type;
qpid::messaging::types::Variant::Map options;
node_type["type"] = "topic";
options["node"] = node_type;
options["assert"] = "always";              // I've found that this is
important or the node type specification may be ignored

qpid::messaging::Address address("amq.topic");

auto sender = session.createSender(address);


On 7 February 2018 at 12:37, Gavrila, Daniel <d.gavr...@selex-es-gmbh.com>

> Hi ,
> I was reading this thread
> http://qpid.2158936.n2.nabble.com/Queue-and-exchange-with-
> the-same-name-td7579722.html
> and I would like to know how I can specify the type of node( queue or
> topic) in C++ Proton like here:
> spout 'amq.topic; {node: {type:topic}}'
> spout 'amq.topic; {node: {type:queue}}'
> Best regards,
> Daniel
> Selex ES GmbH
> Sitz der Gesellschaft / Registered Office: Neuss
> Registergericht / Register Court: Neuss HRB 17453
> Gesch?ftsf?hrer / Managing Director: Ulrich Nellen


*Chris Richardson*, System Architect

*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu

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

Reply via email to