Bug 614861

Summary: [RFE] map_sender and map_receiver need queue/address to be created before, this is not handy in Windows environment
Product: Red Hat Enterprise MRG Reporter: Frantisek Reznicek <freznice>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Frantisek Reznicek <freznice>
Severity: medium Docs Contact:
Priority: low    
Version: DevelopmentCC: esammons, gsim
Target Milestone: 1.3Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-20 11:29:30 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:

Description Frantisek Reznicek 2010-07-15 12:24:01 UTC
Description of problem:

map_sender and map_receiver examples which are part of:
- qpid-cpp-client-devel*.rpm
- qpid-cpp-*.zip

need queue/address to be created before they are run.
This is just very small complication on Linux, but more difficult on Windows where spout should be used for such a purpose (no README exists).

I propose to change both map_sender and map_receiver to create and clean-up the queue/address automatically:

[root@mrg-qe-01 high_level_api]# diff -u /usr/share/qpidc/examples/messaging/map_sender.cpp.old /usr/share/qpidc/examples/messaging/map_sender.cpp
--- /usr/share/qpidc/examples/messaging/map_sender.cpp.old      2010-07-15 08:19:21.000000000 -0400
+++ /usr/share/qpidc/examples/messaging/map_sender.cpp  2010-07-15 08:20:04.000000000 -0400
@@ -41,7 +41,7 @@
     try {
         connection.open();
         Session session = connection.createSession();
-        Sender sender = session.createSender("message_queue");
+        Sender sender = session.createSender("message_queue; {create:sender, delete:receiver}");

         Message message;
         Variant::Map content;




Version-Release number of selected component (if applicable):
qpid-cpp-client-devel-0.7.946106-6.el5
qpid-cpp-0.7.946106-6.zip

How reproducible:
100%

Steps to Reproduce:
1. run map_sender.exe on Windows and you reach dificulties how to run the map_*.exe examples...
  
Actual results:
map_sender/receiver examples does not create / delete queue/address.

Expected results:
map_sender/receiver examples can and should create / delete queue/address.

Additional info:

Comment 1 Gordon Sim 2010-07-19 11:20:55 UTC
Fixed in trunk (r965424) and release repo (http://mrg1.lab.bos.redhat.com/git/?p=qpid.git;a=commitdiff;h=154ec1cfe134c35fead1d8bf86910f088293857a).

Comment 2 Frantisek Reznicek 2010-08-04 11:51:47 UTC
The map_* examples are functional and not requiring address creation on Linux/Windows, tested on RHEL4.8 / 5.5,  Win XP-SP3 / S2003.

-> VERIFIED

Comment 3 Frantisek Reznicek 2010-08-04 11:54:50 UTC
on packages (to be complete)
  qpid-cpp-0.7.946106-11_1.3.0.11.zip
  [root@mrg-qe-07 bz486314]#   rpm -qf /usr/share/qpidc/examples/messaging/map_receiver.cpp ; grep message_q /usr/share/qpidc/examples/messaging/map_receiver.cpp /usr/share/qpidc/examples/messaging/map_sender.cpp
  qpid-cpp-client-devel-0.7.946106-11.el4
  /usr/share/qpidc/examples/messaging/map_receiver.cpp:    const char* address = argc>2 ? argv[2] : "message_queue; {create: always}";
  /usr/share/qpidc/examples/messaging/map_sender.cpp:    const char* address = argc>2 ? argv[2] : "message_queue; {create: always}";