Package proton :: Class Message
[frames] | no frames]

Class Message

source code


The Message class is a mutable holder of message content.

Instance Methods
 
__init__(self, body=None, **kwargs) source code
 
__del__(self) source code
 
clear(self)
Clears the contents of the Message.
source code
 
encode(self) source code
 
decode(self, data) source code
 
send(self, sender, tag=None) source code
 
recv(self, link)
Receives and decodes the message content for the current delivery from the link.
source code
 
__repr2__(self) source code
 
__repr__(self) source code
Class Variables
  DEFAULT_PRIORITY = PN_DEFAULT_PRIORITY
  inferred = property(_is_inferred, _set_inferred, doc= ...
  durable = property(_is_durable, _set_durable, doc= ...
  priority = property(_get_priority, _set_priority, doc= ...
  ttl = property(_get_ttl, _set_ttl, doc= ...
  first_acquirer = property(_is_first_acquirer, _set_first_acqui...
  delivery_count = property(_get_delivery_count, _set_delivery_c...
  id = property(_get_id, _set_id, doc= ...
  user_id = property(_get_user_id, _set_user_id, doc= ...
  address = property(_get_address, _set_address, doc= ...
  subject = property(_get_subject, _set_subject, doc= ...
  reply_to = property(_get_reply_to, _set_reply_to, doc= ...
  correlation_id = property(_get_correlation_id, _set_correlatio...
  content_type = property(_get_content_type, _set_content_type, ...
  content_encoding = property(_get_content_encoding, _set_conten...
  expiry_time = property(_get_expiry_time, _set_expiry_time, doc...
  creation_time = property(_get_creation_time, _set_creation_tim...
  group_id = property(_get_group_id, _set_group_id, doc= ...
  group_sequence = property(_get_group_sequence, _set_group_sequ...
  reply_to_group_id = property(_get_reply_to_group_id, _set_repl...
Instance Variables
dict annotations
infrastructure defined message annotations
bytes | unicode | dict | list | int | long | float | UUID body
message body
dict instructions
delivery instructions for the message
dict properties
application defined message properties
Method Details

__init__(self, body=None, **kwargs)
(Constructor)

source code 
Parameters:
  • kwargs - Message property name/value pairs to initialise the Message
Overrides: object.__init__

clear(self)

source code 

Clears the contents of the Message. All fields will be reset to their default values.

recv(self, link)

source code 

Receives and decodes the message content for the current delivery from the link. Upon success it will return the current delivery for the link. If there is no current delivery, or if the current delivery is incomplete, or if the link is not a receiver, it will return None.

Parameters:
  • link (Link) - the link to receive a message from @return the delivery associated with the decoded message (or None)

__repr__(self)
(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)

Class Variable Details

inferred

Value:
property(_is_inferred, _set_inferred, doc= """
The inferred flag for a message indicates how the message content
is encoded into AMQP sections. If inferred is true then binary and
list values in the body of the message will be encoded as AMQP DATA
and AMQP SEQUENCE sections, respectively. If inferred is false,
then all values in the body of the message will be encoded as AMQP
VALUE sections regardless of their type.
""")

durable

Value:
property(_is_durable, _set_durable, doc= """
The durable property indicates that the message should be held durably
by any intermediaries taking responsibility for the message.
""")

priority

Value:
property(_get_priority, _set_priority, doc= """
The priority of the message.
""")

ttl

Value:
property(_get_ttl, _set_ttl, doc= """
The time to live of the message measured in seconds. Expired messages
may be dropped.
""")

first_acquirer

Value:
property(_is_first_acquirer, _set_first_acquirer, doc= """
True iff the recipient is the first to acquire the message.
""")

delivery_count

Value:
property(_get_delivery_count, _set_delivery_count, doc= """
The number of delivery attempts made for this message.
""")

id

Value:
property(_get_id, _set_id, doc= """
The id of the message.
""")

user_id

Value:
property(_get_user_id, _set_user_id, doc= """
The user id of the message creator.
""")

address

Value:
property(_get_address, _set_address, doc= """
The address of the message.
""")

subject

Value:
property(_get_subject, _set_subject, doc= """
The subject of the message.
""")

reply_to

Value:
property(_get_reply_to, _set_reply_to, doc= """
The reply-to address for the message.
""")

correlation_id

Value:
property(_get_correlation_id, _set_correlation_id, doc= """
The correlation-id for the message.
""")

content_type

Value:
property(_get_content_type, _set_content_type, doc= """
The content-type of the message.
""")

content_encoding

Value:
property(_get_content_encoding, _set_content_encoding, doc= """
The content-encoding of the message.
""")

expiry_time

Value:
property(_get_expiry_time, _set_expiry_time, doc= """
The expiry time of the message.
""")

creation_time

Value:
property(_get_creation_time, _set_creation_time, doc= """
The creation time of the message.
""")

group_id

Value:
property(_get_group_id, _set_group_id, doc= """
The group id of the message.
""")

group_sequence

Value:
property(_get_group_sequence, _set_group_sequence, doc= """
The sequence of the message within its group.
""")

reply_to_group_id

Value:
property(_get_reply_to_group_id, _set_reply_to_group_id, doc= """
The group-id for any replies.
""")