perl stomp interface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

perl stomp interface

Alan Willis

I've put together a basic stomp/perl module.  It is attached, along with
a sample of how to use it.
It is very much alpha, though it is functional.  I believe that the
following items need to be worked on:

* Receipts
* Automatic sending of ACK frames

It could use some very thorough testing as well.

-alan

--
Alan Willis
Ticketmaster
8800 Sunset Blvd, West Hollywood, CA 90069
Office: 310.360.2522 Mobile: 310.499.6358


#!/usr/bin/perl

use strict;
use warnings;

use Stomp::Client;
use Data::Dumper;

my $queue = new Stomp::Client ( login => 'alan', passcode => 'moof' );

$queue->subscribe('/queue/test');

while ( my $response = $queue->receive ) {
    print Dumper $response;
}

#!/usr/bin/perl

use strict;
use warnings;

use Stomp::Client;

my $queue = new Stomp::Client ( login => 'alan', passcode => 'moof' );

$queue->subscribe( '/queue/test' );

my $request = new Stomp::Request( 'SEND', { destination => '/queue/test' }, "Hello Test Client\n" );

$queue->send( $request );
$queue->unsubscribe( '/queue/test' );


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

stomp-perl.tgz (2K) Download Attachment