On 07/02/2014 10:47 AM, Quynh Duong wrote:
I'm a cpp developer and new to the qpid world. I have spent over a day tooling around with qpid cpp api and I was wondering how can I create a pub/sub model, since all the examples that come with the package doesn't give any hints on how it can be done. Things like binding-keys and such that exist on the JMS client doesn't seem to be available in the cpp api, or I must have overlooked. I am running and building all this on CentOS 6.5. Please help, thank you.
It depends on the broker (or equivalent) you want to run against. If you are using one of the Qpid brokers, you can just send/receive to/from a particular exchange.
E.g. if you specify amq.topic/*.news as the address for your receiver, then you can e.g. send to amq.topic setting different subjects on the message, and subjects like europe.news or usa.news would be received by the receiver whereas as usa.weather would not.
A more simple case would just be using e.g. amq,fanout for both sender and receivers and then all messages to the topic will be received by all receivers, i.e. with no wildcard filtering.
Have a look at http://qpid.apache.org/releases/qpid-0.28/programming/book/section-addresses.html for a brief description, and feel free to ask any further questions you have!
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
