Bug 614861 - [RFE] map_sender and map_receiver need queue/address to be created before, this is not handy in Windows environment
Summary: [RFE] map_sender and map_receiver need queue/address to be created before, th...
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp   
(Show other bugs)
Version: Development
Hardware: All
OS: All
Target Milestone: 1.3
: ---
Assignee: Gordon Sim
QA Contact: Frantisek Reznicek
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-15 12:24 UTC by Frantisek Reznicek
Modified: 2015-11-16 01:12 UTC (History)
2 users (show)

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

Attachments (Terms of Use)

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 {
         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):

How reproducible:

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.


Comment 3 Frantisek Reznicek 2010-08-04 11:54:50 UTC
on packages (to be complete)
  [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
  /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.