diff --git a/TODO b/TODO index 3dbb4e2..bf5b03b 100644 --- a/TODO +++ b/TODO @@ -1 +1,3 @@ * Be more awesome + +* Support auto reconnect diff --git a/stompy/distmeta.py b/stompy/distmeta.py index cdbf878..35a0cf8 100644 --- a/stompy/distmeta.py +++ b/stompy/distmeta.py @@ -1,6 +1,6 @@ """Implementation of the STOMP protocol in Python. """ -VERSION = (0, 2, 9) +VERSION = (0, 2, 10) __version__ = ".".join(map(str, VERSION)) __author__ = "Benjamin W. Smith" __contact__ = "benjaminwarfield@just-another.net" diff --git a/stompy/simple.py b/stompy/simple.py index cb5eaef..5342421 100644 --- a/stompy/simple.py +++ b/stompy/simple.py @@ -63,7 +63,7 @@ def get_nowait(self): """ return self.get(block=False) - def put(self, item, destination, persistent=True, conf=None): + def put(self, item, destination, persistent=True, conf=None,receipt=True): """Put an item into the queue. :param item: Body of the message. @@ -78,7 +78,7 @@ def put(self, item, destination, persistent=True, conf=None): conf = self._make_conf(conf, body=item, destination=destination, persistent=persistent) - return self.stomp.send(conf) + return self.stomp.send(conf,receipt) def connect(self, username=None, password=None, clientid=None): """Connect to the broker. diff --git a/stompy/stomp.py b/stompy/stomp.py index ad2ecc7..b6faa87 100644 --- a/stompy/stomp.py +++ b/stompy/stomp.py @@ -68,7 +68,7 @@ def disconnect(self, conf=None): pass self.connected = False - def send(self, conf=None): + def send(self, conf=None, receipt=True): """Send message to STOMP server You'll need to pass the body and any other headers your @@ -87,7 +87,7 @@ def send(self, conf=None): headers = dict(conf) body = headers.pop("body", "") return self._send_command("SEND", headers, extra={"body": body}, - want_receipt=True) + want_receipt=receipt) def _build_frame(self, *args, **kwargs): self._connected_or_raise()