Bug 461572
Summary: | Simpler examples in the Tutorial | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | David Sommerseth <davids> | ||||
Component: | Documentation | Assignee: | Jonathan Robie <jonathan.robie> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Kim van der Riet <kim.vdriet> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1.0 | CC: | gsim, ovasik | ||||
Target Milestone: | --- | Keywords: | Documentation | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2008-11-05 19:36:40 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
When I compare your program to the first program in the tutorial, I think the main difference is that you use the default exchange, which saves a few lines of code, but actually not that many. The advantage of the approach I currently take is that the code reflects the basic concepts people need to learn. So your program avoids these lines: session.queueDeclare(arg::queue="message_queue"); session.exchangeBind(arg::exchange="amq.direct", arg::queue="message_queue", arg::bindingKey="routing_key"); But these lines are central to understanding the relationship between exchanges, queues, and bindings. Your program uses the default exchange, so it does not need these lines, but the tutorial would still have to explain why the messages in your program somehow get delivered to the queue. I would have to explain the default exchange and the bindings it uses in the very first example, without any explicit syntax to point to. You also save an argument in messageTransfer() by not specifying the exchange to which the message is sent, so it defaults to the default exchange. The first example in the tutorial specifies the direct exchange: session.messageTransfer(arg::content=message, arg::destination="amq.direct"); For reading from the queue, your program is *definitely* simpler. The current tutorial code starts with a message listener rather than SubscriptionManager.get() or perhaps a local queue. Modifying the first example to use one of these simpler methods might make sense, but I would still want to introduce listener.cpp as part of the initial direct example, because most of the time, we really do want people to read using either a message listener or a local queue. Jonathan |
Created attachment 316158 [details] simple qpid client The examples in the tutorial jumps to a pretty advanced level quite quickly. I would suggest to make also space for some really small and easy level examples as well, to get started and get familiar with the concept. I've written a small program used for testing a bug, and this could most probably be modified and adjusted to fit into such an example.