Package qpid :: Package messaging :: Module message :: Class Message
[frames] | no frames]

Class Message

source code

A message consists of a standard set of fields, an application defined set of properties, and some content.

Instance Methods
 
__init__(self, content=None, content_type=UNSPECIFIED, id=None, subject=None, user_id=None, reply_to=None, correlation_id=None, durable=None, priority=None, ttl=None, properties=None)
Construct a new message with the supplied content.
source code
 
__repr__(self) source code
Instance Variables
str, unicode, buffer, dict, list content
the message content
str content_type
the content-type of the message
str correlation_id
a correlation-id for the message
bool durable
message durability
str id
the message id
int priority
message priority
dict properties
application specific message properties
str reply_to
the address to send replies
str subject
message subject
float ttl
time-to-live measured in seconds
str user_id
the user-id of the message producer
Method Details

__init__(self, content=None, content_type=UNSPECIFIED, id=None, subject=None, user_id=None, reply_to=None, correlation_id=None, durable=None, priority=None, ttl=None, properties=None)
(Constructor)

source code 

Construct a new message with the supplied content. The content-type of the message will be automatically inferred from type of the content parameter.

Parameters:
  • content (str, unicode, buffer, dict, list) - the message content
  • content_type (str) - the content-type of the message