Issue Details (XML | Word | Printable)

Key: AMQ-1192
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Joel Schaubert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

STOMP client cannot be stopped and disconnected without loosing messages

Created: 07/Mar/07 08:26 AM   Updated: 13/Mar/07 08:32 PM
Return to search
Component/s: None
Affects Version/s: 4.1.0
Fix Version/s: 4.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
File activemq_tester.c 2007-03-07 08:26 AM Joel Schaubert 7 kB
Environment:
C stomp client on AS3 linux
apache-activemq-4.1.0-incubator
apache APR 0.9.7



 Description  « Hide
I have added to the STOMP tester so it can take command line args for number of message to be read/sent. Using this the following tests will show the problems

#1) All messages are lost when a client does STOMP disconnect

1.1 start a subscriber to read 5 messages
./activemq_tester -d sub -m 5
1.2 start a publisher to publish 10 messages
./activemq_tester -d pub -m 10
1.3 run subscriber again to get the remaining 5 messages
./activemq_tester -d sub -m 5

---> No messages are available for the second run of the test subscriber. It seems there is no way to shutdown a stomp client without loosing all the messages on that q.

Output here.

-bash-2.05b$ ./activemq_tester -d pub -m 10
Connecting......OK
Sending connect message.OK
Reading Response.Response: CONNECTED,
OK
Sending Message.Sending Message: This is message number 0
Sending Message: This is message number 1
Sending Message: This is message number 2
Sending Message: This is message number 3
Sending Message: This is message number 4
Sending Message: This is message number 5
Sending Message: This is message number 6
Sending Message: This is message number 7
Sending Message: This is message number 8
Sending Message: This is message number 9
OK
Sending Disconnect.OK
Disconnecting...OK

— first run of subscriber ----------------------
-bash-2.05b$ ./activemq_tester -d sub -m 5
Connecting......OK
Sending connect message.OK
Reading Response.Response: CONNECTED,
OK
Sending Subscribe.OK
Reading Subscribed Messsages.Received: MESSAGE, This is message number 0
Received: MESSAGE, This is message number 1
Received: MESSAGE, This is message number 2
Received: MESSAGE, This is message number 3
Received: MESSAGE, This is message number 4
OK
Sending Disconnect.OK
Disconnecting...OK

----- second run of subscriber -----------------
-bash-2.05b$ ./activemq_tester -d sub -m 5
Connecting......OK
Sending connect message.OK
Reading Response.Response: CONNECTED,
OK
Sending Subscribe.OK
Reading Subscribed Messsages.

=======> None of the remaning message numbers 5...9 are available. They are lost.

2) Now to see the ghost STOMP subscriber problem, hit control-C to stop the subscriber.
Then rerun subscriber and publisher and see the following output.....
(publisher output not shown here, same as before)

-bash-2.05b$ ./activemq_tester -d sub -m 5
Connecting......OK
Sending connect message.OK
Reading Response.Response: CONNECTED,
OK
Sending Subscribe.OK
Reading Subscribed Messsages.Received: MESSAGE, This is message number 1
Received: MESSAGE, This is message number 3
Received: MESSAGE, This is message number 5
Received: MESSAGE, This is message number 7
Received: MESSAGE, This is message number 9
OK
Sending Disconnect.OK
Disconnecting...OK



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
No related commits found.