On 21/05/2020 10:22 am, mohank wrote:
I am new to QPID C++ and AMQP 1.0, previously using AMQP 0.9.1 in RabbitMQ
broker.
at present i am working on AMQP 1.0
client : QPID C++
broker : RabbitMQ with AMQP 1.0 plugin enabled.
I wanted publish data using topic, and data should distribute to Queues
which match the topic.
but instead of that it creates Queue(with given routing key)
Can someone guide me where I am missing.
Ex:
/-------------------------------
I have Created Queues
NEWS(with RK #.news)
USA(with RK usa.#)
/------------------------------
Connection connection(broker, connectionOptions);
connection.open();
Session session = connection.createSession("amq.topic");
Sender sender = session.createSender("usa.news; {create: always, node:
{type: topic}}");
From
https://github.com/rabbitmq/rabbitmq-amqp1.0#routing-and-addressing, to
publish to amq.topic, the address passed to createSender() should be
"'/topic/'" or "'/exchange/amq.topic/'" (note the extra quotes).
E.g.
Sender sender = session.createSender("'/topic/'");
However if you are starting out, it would be worth at least considering
the Qpid proton c++ API
(https://qpid.apache.org/releases/qpid-proton-0.31.0/proton/cpp/api/index.html)
message.setSubject("europe.news");
sender.send(message); // Expect this to publish data to News Queue
message.setSubject("usa.news");
sender.send(message); // Expect this to publish data to both USA and NEWS
queue.
but instead it is creating Queue "usa.news" and publishibg the data to the
same.
Please guide me.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]