#!/usr/bin/perl use strict; use warnings; use Net::Stomp; my $stomp = Net::Stomp->new({ hostname => 'localhost', port => '61613' }); $stomp->connect({ login => 'user', passcode => 'passcode' }); $stomp->subscribe( { destination => '/queue/foo', 'ack' => 'client', 'activemq.prefetchSize' => 1 } ); my $frame = $stomp->receive_frame; warn $frame->body; my $can_read = $stomp->can_read({ timeout => 5 }); $stomp->ack({ frame => $frame }); $stomp->disconnect;