Skip to content
Snippets Groups Projects
Commit 1df5e6ae authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

argumentify added

parent 5206612f
No related branches found
No related tags found
No related merge requests found
Pipeline #63917 passed with stages
in 2 minutes and 26 seconds
......@@ -5,6 +5,7 @@ v2.0.1
======
* removed extra logging from argumentify
* user will be notified upon declaring an auto-delete durable exchange
v2.0.0
======
......
......@@ -37,7 +37,7 @@ class MessageProperties(BasicContentPropertyList):
:type correlation_id: binary type (max length 255) (AMQP as shortstr)
:param reply_to: address to reply to
:type reply_to: binary type (max length 255) (AMQP as shortstr)
:param expiration: message expiration specification
:param expiration: message expiration specification (in milliseconds)
:type expiration: binary type (max length 255) (AMQP as shortstr)
:param message_id: application message identifier
:type message_id: binary type (max length 255) (AMQP as shortstr)
......@@ -207,6 +207,7 @@ class Exchange(object):
:param name: exchange name
:param arguments: either a list of (bytes, values) or a dict of (str, value) to pass as an extra argument
:param type: type of the exchange. So far, valid types are 'direct', 'fanout', 'topic' and 'headers'
"""
__slots__ = ('name', 'type', 'durable', 'auto_delete', 'arguments')
......@@ -224,6 +225,9 @@ class Exchange(object):
self.auto_delete = auto_delete
self.arguments = argumentify(arguments)
if self.auto_delete and self.durable:
warnings.warn('What is your purpose in declaring a durable auto-delete exchange?', UserWarning)
assert isinstance(self.name, six.text_type)
assert isinstance(self.type, six.binary_type)
......
......@@ -102,3 +102,12 @@ In order to make use of an anonymous queue, you must first :meth:`coolamqp.clust
raise ValueError if you try to do that, anyway.
Anonymous queues must be auto_delete and exclusive, ValueError will be raised otherwise.
Who am I talking to?
--------------------
To identify the server you're talking to just connect and use :meth:`coolamqp.clustering.Cluster.properties`,
which will return the following class:
.. autoclass:: coolamqp.objects.ServerProperties
:members:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment