1Net::STOMP::Client::RecUesieprt(C3o)ntributed Perl DocumNeentt:a:tSiToOnMP::Client::Receipt(3)
2
3
4
6 Net::STOMP::Client::Receipt - Receipt support for Net::STOMP::Client
7
9 use Net::STOMP::Client;
10 $stomp = Net::STOMP::Client->new(host => "127.0.0.1", port => 61613);
11 ...
12 # send two messages with receipts
13 $stomp->send(
14 destination => "/queue/test1",
15 body => "message 1",
16 receipt => $stomp->uuid(),
17 );
18 $stomp->send(
19 destination => "/queue/test2",
20 body => "message 2",
21 receipt => $stomp->uuid(),
22 );
23 # wait for both acknowledgments to come back within ten seconds
24 $stomp->wait_for_receipts(timeout => 10);
25 die("Not all receipts received!\n") if $stomp->receipts();
26
28 This module eases receipts handling. It is used internally by
29 Net::STOMP::Client and should not be directly used elsewhere.
30
31 Each time a client frame is sent, its "receipt" header (if supplied) is
32 remembered.
33
34 Each time a "RECEIPT" frame is received from the server, the
35 corresponding receipt is ticked off.
36
37 The receipts() method can be used to get the list of outstanding
38 receipts.
39
40 The wait_for_receipts() method can be used to wait for all missing
41 receipts.
42
44 This module provides the following methods to Net::STOMP::Client:
45
46 receipts()
47 get the list of not-yet-received receipts
48
49 wait_for_receipts([OPTIONS])
50 wait for all receipts to be received, using wait_for_frames()
51 underneath; take the same options as wait_for_frames(), except
52 "callback" which is overridden
53
55 Net::STOMP::Client.
56
58 Lionel Cons <http://cern.ch/lionel.cons>
59
60 Copyright (C) CERN 2010-2021
61
62
63
64perl v5.38.0 2023-07-21 Net::STOMP::Client::Receipt(3)