Bug 685123 - C++ "drain" example for Windows behaves different from C++ "drain" example for Linux and C# "drain" example
Summary: C++ "drain" example for Windows behaves different from C++ "drain" example fo...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: Unspecified
OS: Windows
medium
medium
Target Milestone: ---
: ---
Assignee: Chuck Rolke
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-15 11:19 UTC by Petra Svobodová
Modified: 2020-05-22 14:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-22 14:35:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Petra Svobodová 2011-03-15 11:19:56 UTC
Description of problem:

The C++ "drain" example for Windows receives only number of messages from a queue specified by "count" parameter or one message if the parameter is not set.
This behaviour is different from the C++ "drain" example for Linux and the C# "drain"example. The both applications accept no "count" parameter and receive all messages from the queue.
The behaviors of drain examples should be the same, in current state customers may get confused why qpid c++ library/client behaves the different way from the c# one.


Version-Release number of selected component (if applicable):

qpid-cpp-x64-1.3.8.1.zip
qpid-cpp-x86-1.3.8.1.zip


How reproducible:

100%


Steps to Reproduce:

1. Unzip and build the appropriate "qpid-cpp" package

2. Send some messages (more than one) using the "spout.exe" application: spout.exe --broker <broker IP> --content "MESSAGE CONTENT" --count 3 "ADDRESS;{create:sender,delete:receiver}"

3. Try to receive the messages using the C++ "drain.exe" application:
drain.exe --broker <broker IP> "ADDRESS;{create:sender,delete:receiver}" or 
drain.exe --broker <broker IP> --count 2 "ADDRESS;{create:sender,delete:receiver}"

See the "Additional info" part, please.
  
Actual results:

The C++ "drain.exe" example application receives only a number of messages specified by the "count" parameter (2 in our case) or one message if the "count" parameter is not set.


Expected results:

The C++ "drain.exe" example should receive all available messages (3) from the queue as other "drain" applications (C# and C++ for Linux).


Additional info:

See the Windows command line snippet below:

C:\qpid>cd examples\messaging\Release

C:\qpid\examples\messaging\Release>spout.exe --broker 10.34.37.202 --content "HE
LLO" --count 3 "ADDR;{create:sender,delete:receiver}"

C:\qpid\examples\messaging\Release>drain.exe --broker 10.34.37.202 "ADDR;{create
:sender,delete:receiver}"
Message(properties={spout-id:66c4402a-16b6-4765-965b-116177a6fcd6:0, x-amqp-0-10
.routing-key:ADDR}, content='HELLO')

C:\qpid\examples\messaging\Release>spout.exe --broker 10.34.37.202 --content "HE
LLO" --count 3 "ADDR;{create:sender,delete:receiver}"

C:\qpid\examples\messaging\Release>drain.exe --broker 10.34.37.202 --count 2 "AD
DR;{create:sender,delete:receiver}"
Message(properties={spout-id:e90eedad-ae2c-4a25-b9d5-3e27ea540601:0, x-amqp-0-10
.routing-key:ADDR}, content='HELLO')
Message(properties={spout-id:63cb9060-f0f3-43b4-b937-97bfec4da8d8:1, x-amqp-0-10
.routing-key:ADDR}, content='HELLO')

C:\qpid\examples\messaging\Release>spout.exe --broker 10.34.37.202 --content "HE
LLO" --count 3 "ADDR;{create:sender,delete:receiver}"

C:\qpid\examples\messaging\Release>cd \qpid\bin

C:\qpid\bin>csharp.example.drain.exe --broker 10.34.37.202 "ADDR;{create:sender,
delete:receiver}"
Message(properties={spout-id=ddc42a02-1795-47af-adfa-ba60b16c02e2:0, x-amqp-0-10
.routing-key=ADDR}, content='HELLO')
Message(properties={spout-id=63bac1a9-e929-4159-b3fc-d66847f3e666:1, x-amqp-0-10
.routing-key=ADDR}, content='HELLO')
Message(properties={spout-id=bb95105a-8ed4-49f6-8f45-84f355f36e92:2, x-amqp-0-10
.routing-key=ADDR}, content='HELLO')

C:\qpid\bin>cd \qpid\examples\messaging\Release

C:\qpid\examples\messaging\Release>spout.exe --broker 10.34.37.202 --content "HE
LLO" --count 3 "ADDR;{create:sender,delete:receiver}"

C:\qpid\examples\messaging\Release>cd \qpid\bin

C:\qpid\bin>csharp.example.drain.exe --broker 10.34.37.202 --count 2 "ADDR;{crea
te:sender,delete:receiver}"
Message(properties={spout-id=c0f5935f-ee58-40ec-b074-4d7328df03e7:0, x-amqp-0-10
.routing-key=ADDR}, content='HELLO')
Message(properties={spout-id=807408a5-f9ac-426d-8b31-94ebee60ccb8:1, x-amqp-0-10
.routing-key=ADDR}, content='HELLO')
Message(properties={spout-id=3f09855a-7c4a-46de-bc50-caa9eed92a5f:2, x-amqp-0-10
.routing-key=ADDR}, content='HELLO')

C:\qpid\bin>


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