Bug 614861 - [RFE] map_sender and map_receiver need queue/address to be created before, this is not handy in Windows environment
[RFE] map_sender and map_receiver need queue/address to be created before, th...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
Development
All All
low Severity medium
: 1.3
: ---
Assigned To: Gordon Sim
Frantisek Reznicek
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-15 08:24 EDT by Frantisek Reznicek
Modified: 2015-11-15 20:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-20 07:29:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frantisek Reznicek 2010-07-15 08:24:01 EDT
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 07:20:55 EDT
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 07:51:47 EDT
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 07:54:50 EDT
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}";

Note You need to log in before you can comment on or make changes to this bug.