Hi Gondon, Thanks you for your precious help, I reuse your sample and did my implementation based on it.
Thanks a lot. Sugestion, it's could be interesting to put them in the sample, isn't it ? 2013/6/11 Gordon Sim <[email protected]> > On 06/11/2013 05:58 PM, Xavier Millieret wrote: > >> Is it possible to use Messaging api to have the same behavior like JMS. >> i.e. >> I would like to set a message listener at my receiver (I don't see any >> sample on this, with the messaging api) >> and for the patern publish/subscribe, can we use the messaging api, or >> client api (all sample for the pub/sub are done with client api, isn't it >> ?) >> > > I'm assuming you are talking about the c++ client APIs here. I would > strongly recommend using qpid::messaging, not qpid::client. > > The pub/sub pattern is certainly possible with qpid::messaging. All you > need to do is use an exchange as the node. E.g. for a simple pub-sub scheme > where all subscribers receive all messages, you can use 'amq.fanout' as the > address for senders and receivers. Try the messaging examples drain and > spout passing that as the addres for example. (Also if you have not done > so, its probably worth a quick read of http://qpid.apache.org/books/** > 0.20/Programming-In-Apache-**Qpid/html/section-addresses.**html<http://qpid.apache.org/books/0.20/Programming-In-Apache-Qpid/html/section-addresses.html> > ). > > If you need multiple distinct 'topics' you can either create a fanout > exchange for each (my prefered approach generally) or you can use > amq.direct/topic-name. If you need a hierarchical topic space with wildcard > matching you can use a topic exchange. > > As for dispatching messages to a listener or callback, that can be easily > built on top of the messaging API. Attached is an example that does what > the old qpid::client API did. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
