For details on how to use message, see Using OpenStack Message
The message high-level interface is available through the message
member
of a Connection
object. The message
member will only be added if the service is detected.
openstack.message.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)post_message
(queue_name, messages)Post messages to given queue
queue_name – The name of target queue to post message to.
messages (list
) – List of messages body and TTL to post.
A string includes location of messages successfully posted.
messages
(queue_name, **query)Retrieve a generator of messages
queue_name – The name of target queue to query messages from.
query (kwargs) –
Optional query parameters to be sent to restrict the messages to be returned. Available parameters include:
returned from the query.
limit parameter to make an initial limited request and use the ID of the last-seen subscription from the response as the marker parameter value in a subsequent limited request.
that posted them.
the claimed messages.
A generator of message instances.
get_message
(queue_name, message)Get a message
queue_name – The name of target queue to get message from.
message – The value can be the name of a message or a
Message
instance.
One Message
ResourceNotFound
when no
message matching the criteria could be found.
delete_message
(queue_name, value, claim=None, ignore_missing=True)Delete a message
queue_name – The name of target queue to delete message from.
value – The value can be either the name of a message or a
Message
instance.
claim – The value can be the ID or a
Claim
instance of
the claim seizing the message. If None, the message has
not been claimed.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the message does not exist.
When set to True
, no exception will be set when
attempting to delete a nonexistent message.
None
openstack.message.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)create_queue
(**attrs)Create a new queue from attributes
attrs (dict) – Keyword arguments which will be used to create
a Queue
,
comprised of the properties on the Queue class.
The results of queue creation
Queue
get_queue
(queue)Get a queue
queue – The value can be the name of a queue or a
Queue
instance.
One Queue
ResourceNotFound
when no
queue matching the name could be found.
queues
(**query)Retrieve a generator of queues
query (kwargs) –
Optional query parameters to be sent to restrict the queues to be returned. Available parameters include:
returned from the query.
parameter to make an initial limited request and use the ID of the last-seen queue from the response as the marker parameter value in a subsequent limited request.
A generator of queue instances.
delete_queue
(value, ignore_missing=True)Delete a queue
value – The value can be either the name of a queue or a
Queue
instance.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the queue does not exist.
When set to True
, no exception will be set when
attempting to delete a nonexistent queue.
None
openstack.message.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)create_claim
(queue_name, **attrs)Create a new claim from attributes
queue_name – The name of target queue to claim message from.
attrs (dict) – Keyword arguments which will be used to create a
Claim
,
comprised of the properties on the Claim class.
The results of claim creation
Claim
get_claim
(queue_name, claim)Get a claim
queue_name – The name of target queue to claim message from.
claim – The value can be either the ID of a claim or a
Claim
instance.
One Claim
ResourceNotFound
when no
claim matching the criteria could be found.
update_claim
(queue_name, claim, **attrs)Update an existing claim from attributes
queue_name – The name of target queue to claim message from.
claim – The value can be either the ID of a claim or a
Claim
instance.
attrs (dict) – Keyword arguments which will be used to update a
Claim
,
comprised of the properties on the Claim class.
The results of claim update
Claim
delete_claim
(queue_name, claim, ignore_missing=True)Delete a claim
queue_name – The name of target queue to claim messages from.
claim – The value can be either the ID of a claim or a
Claim
instance.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the claim does not exist.
When set to True
, no exception will be thrown when
attempting to delete a nonexistent claim.
None
openstack.message.v2._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)create_subscription
(queue_name, **attrs)Create a new subscription from attributes
queue_name – The name of target queue to subscribe on.
attrs (dict) – Keyword arguments which will be used to create a
Subscription
,
comprised of the properties on the Subscription class.
The results of subscription creation
Subscription
subscriptions
(queue_name, **query)Retrieve a generator of subscriptions
queue_name – The name of target queue to subscribe on.
query (kwargs) –
Optional query parameters to be sent to restrict the subscriptions to be returned. Available parameters include:
returned from the query.
limit parameter to make an initial limited request and use the ID of the last-seen subscription from the response as the marker parameter value in a subsequent limited request.
A generator of subscription instances.
get_subscription
(queue_name, subscription)Get a subscription
queue_name – The name of target queue of subscription.
message – The value can be the ID of a subscription or a
Subscription
instance.
One Subscription
ResourceNotFound
when no
subscription matching the criteria could be found.
delete_subscription
(queue_name, value, ignore_missing=True)Delete a subscription
queue_name – The name of target queue to delete subscription from.
value – The value can be either the name of a subscription or a
Subscription
instance.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the subscription does not exist.
When set to True
, no exception will be thrown when
attempting to delete a nonexistent subscription.
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.