Created
July 23, 2009 21:58
Revisions
-
jtimberman created this gist
Jul 23, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ About the test system (debian5test): $ cat /etc/debian_version 5.0.2 $ dpkg -l stompserver libnet-stomp-perl perl ruby ii libnet-stomp-perl 0.34-1 A Streaming Text Orientated Messaging Protocol Client ii perl 5.10.0-24 Larry Wall's Practical Extraction and Report Language ii ruby 4.2 An interpreter of object-oriented scripting language Ruby ii stompserver 0.9.9-1 a stomp messaging server implemented in ruby This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/usr/bin/perl use Net::Stomp; my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } ); $stomp->connect(); $stomp->send({ destination => '/queue/foo', body => "TEST" } ); $stomp->disconnect; $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } ); $stomp->connect(); $stomp->subscribe( { destination => '/queue/foo', 'ack' => 'client', 'activemq.prefetchSize' => 1 } ); $stomp->receive_frame; print "sleep...\n"; sleep(10); $stomp->disconnect; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/usr/bin/perl use Net::Stomp; my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } ); $stomp->connect(); $stomp->subscribe( { destination => '/queue/foo', 'ack' => 'client', 'activemq.prefetchSize' => 1 } ); my $frame = $stomp->receive_frame; print $frame->body . "\n"; $stomp->ack( { frame => $frame } ); $stomp->disconnect; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ receive_data: "CONNECT\n\n\000" Connecting Sending frame CONNECTED session:wow receive_data: "SEND\ndestination:/queue/foo\n\nTEST\000" Sending a message to /queue/foo: receive_data: "DISCONNECT\n\n\000" Polite disconnect "Unbind called" Disconnecting receive_data: "CONNECT\n\n\000" Connecting Sending frame CONNECTED session:wow receive_data: "SUBSCRIBE\nactivemq.prefetchSize:1\nack:client\ndestination:/queue/foo\n\n\000" Subscribing to /queue/foo Sending destination backlog for /queue/foo Sending frame MESSAGE message-id:debian5test-1248385938-138925-1 destination:/queue/foo TEST receive_data: "CONNECT\n\n\000" Connecting Sending frame CONNECTED session:wow receive_data: "SUBSCRIBE\nactivemq.prefetchSize:1\nack:client\ndestination:/queue/foo\n\n\000" Subscribing to /queue/foo Sending destination backlog for /queue/foo Sending frame MESSAGE message-id:debian5test-1248386040-221828-3 destination:/queue/foo TEST receive_data: "ACK\nmessage-id:debian5test-1248386040-221828-3\n\n\000" Acking debian5test-1248386040-221828-3 Sending a backlog Nothing left receive_data: "DISCONNECT\n\n\000" Polite disconnect "Unbind called" Disconnecting receive_data: "DISCONNECT\n\n\000" Polite disconnect "Unbind called" Disconnecting