From c70bf3ea28cdf6bafd8571690d3e5c466a0658a2 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Fri, 20 Sep 2013 18:59:30 +0000 Subject: QPID-4984: WIP - Merge from trunk r.1525056 git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/linearstore@1525101 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/examples/api/spout | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qpid/python/examples/api') diff --git a/qpid/python/examples/api/spout b/qpid/python/examples/api/spout index e4d7cfb970..6584b853fc 100755 --- a/qpid/python/examples/api/spout +++ b/qpid/python/examples/api/spout @@ -45,6 +45,8 @@ parser.add_option("-l", "--reconnect-limit", type="int", help="maximum number of reconnect attempts") parser.add_option("-c", "--count", type="int", default=1, help="stop after count messages have been sent, zero disables (default %default)") +parser.add_option("-d", "--durable", action="store_true", + help="make the message persistent") parser.add_option("-t", "--timeout", type="float", default=None, help="exit after the specified time") parser.add_option("-I", "--id", help="use the supplied id instead of generating one") @@ -111,6 +113,8 @@ try: msg = Message(subject=opts.subject, reply_to=opts.reply_to, content=content) + if opts.durable: + msg.durable = True if content_type is not None: msg.content_type = content_type msg.properties["spout-id"] = "%s:%s" % (spout_id, count) -- cgit v1.2.1