IPWorks IoT 2020 Python Edition

Questions / Feedback?

request_receipts Property

Whether the class should request that the server provide message receipts.

Syntax

def get_request_receipts() -> bool: ...
def set_request_receipts(value: bool) -> None: ...

request_receipts = property(get_request_receipts, set_request_receipts)

Default Value

FALSE

Remarks

This property is used to specify whether the class should request that the server send back confirmations (known as a "receipts" in STOMP terminology) when it receives messages from the class. This is done by adding a receipt header to the outgoing frame.

When this property is set to True, and a message is sent, the on_receipt_out event will fire immediately after the on_message_out event fires.

Note that, while this property only controls receipt requests for outgoing messages, the class is capable of requesting receipts for any outgoing frame type. Use this table to determine which API members control receipt request for each outgoing frame type (all are False by default):

To Request Receipts For... Set The...
Messages request_receipts property
Message acknowledgment frames RequestAckReceipts configuration setting
Subscribe and Unsubscribe frames RequestSubscriptionReceipts configuration setting
Begin, Commit, and Abort transaction framesRequestTransactionReceipts configuration setting

Received Receipt Notes

When a receipt is received, the on_receipt_in event fires.

Note that receipts are cumulative, and a STOMP server is not required to send back discrete receipts for each frame it receives that has a receipt header. For example, if the class has sent four message frames with the following receipt header values (in chronological order):

  1. SEND-3
  2. SEND-4
  3. SEND-5
  4. SEND-6
then the server could, at some point, send back a single receipt with a receipt-id header value of SEND-5 to confirm that it has received the first three frames.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 Python Edition - Version 20.0 [Build 8265]