Hide Forgot
Description of problem: The old API examples are still shipped and in the highlevel dir than the examples for the new API. This is very confusing for new users. Old examples should be moved to a old_api_examples directory. New examples should be promoted up and different examples to their own directories. We need more examples too. I moved the feeddemo upstream but it's stuck in a jira. We could do with HA examples that doesn't require clustering. etc. The idea is that newbies need to find current useful examples quickly. NOT old confusing examples. More comments welcome. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Which rpms do you have installed? I don't see the old examples: # rpm -qv qpid-cpp-client-devel qpid-cpp-client-devel-0.7.946106-28.el5 # rpm -ql qpid-cpp-client-devel | grep examples /usr/share/qpidc/examples/messaging /usr/share/qpidc/examples/messaging/Makefile /usr/share/qpidc/examples/messaging/OptionParser.cpp /usr/share/qpidc/examples/messaging/OptionParser.h /usr/share/qpidc/examples/messaging/client.cpp /usr/share/qpidc/examples/messaging/drain.cpp /usr/share/qpidc/examples/messaging/hello_world.cpp /usr/share/qpidc/examples/messaging/hello_xml.cpp /usr/share/qpidc/examples/messaging/map_receiver.cpp /usr/share/qpidc/examples/messaging/map_sender.cpp /usr/share/qpidc/examples/messaging/server.cpp /usr/share/qpidc/examples/messaging/spout.cpp
I'll check my MRG install. Perhaps this should be a Jira for upstream instead.
We are not shipping the old examples. Good. However this doesn't address the organization of the current examples and the lack of detailed examples. To use drain and spout you kinda need to know the addressing. We need more examples of addressing for different cases. True that we encourage people to setup queues and exchanges using qpid-config. (I'm not sure if we explicitly encourage this in the docs.) Suggestions: Examples that actually script different exchange/queue/binding setup/remove etc. Examples that show various addressing in C++ API. Some programmers will be using MRG-M for building up infrastructure - e.g. wrapping existing infrastructure calls. Therefore managing exchange/queue/binding setup through Sender and Receiver addressing will be done programmatically. Examples that show how addressing to setup and use topic exchange and topics. Other suggestions. The feeddemo (moved upstream) shows how to do addressing for Receivers of topics. (may need review).
Example for a topic (using Ruby with C++ API): newtopic = "my-topic;{node:{type:topic, x-declare:{type:topic}}, {create:always}" sender = session.createSender(newtopic)
I don't think dynamically creating exchanges in this way is a very common pattern and most cases that think they need to do that don't really need to at all. I would not want to encourage people to follow that pattern as it is more error prone as well as being more complex and scary in the addressing options. Examples 2.5 and 2.6 in the Programming Guide to explain how to use addresses for simple topic use cases.