Net::STOMP::Client::Receipt - Receipt support for Net::STOMP::Client
use Net::STOMP::Client; $stomp = Net::STOMP::Client->new(host => "127.0.0.1", port => 61613); ... # send two messages with receipts $stomp->send( destination => "/queue/test1", body => "message 1", receipt => $stomp->uuid(), ); $stomp->send( destination => "/queue/test2", body => "message 2", receipt => $stomp->uuid(), ); # wait for both acknowledgments to come back within ten seconds $stomp->wait_for_receipts(timeout => 10); die("Not all receipts received!\n") if $stomp->receipts();
This module eases receipts handling. It is used internally by Net::STOMP::Client and should not be directly used elsewhere.
Each time a client frame is sent, its receipt header (if supplied) is remembered.
receipt
Each time a RECEIPT frame is received from the server, the corresponding receipt is ticked off.
RECEIPT
The receipts() method can be used to get the list of outstanding receipts.
The wait_for_receipts() method can be used to wait for all missing receipts.
This module provides the following methods to Net::STOMP::Client:
get the list of not-yet-received receipts
wait for all receipts to be received, using wait_for_frames() underneath; take the same options as wait_for_frames(), except callback which is overridden
callback
Net::STOMP::Client.
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2010-2013
To install Net::STOMP::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::STOMP::Client
CPAN shell
perl -MCPAN -e shell install Net::STOMP::Client
For more information on module installation, please visit the detailed CPAN module installation guide.