1#!perl
2use strict;
3use warnings;
4use lib 'lib';
5use DateTime;
6use Net::Stomp;
7
8my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } );
9$stomp->connect( { login => 'hello', passcode => 'there' } );
10
11my $count = shift || 1;
12
13foreach my $i ( 1 .. $count ) {
14    warn $i;
15    $stomp->send(
16        {   destination   => '/queue/foo',
17            body          => DateTime->now . " $i",
18            bytes_message => 1,
19        }
20    );
21}
22
23$stomp->disconnect;
24