summaryrefslogtreecommitdiff
path: root/qpid/python/examples
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2013-09-20 18:59:30 +0000
committerKim van der Riet <kpvdr@apache.org>2013-09-20 18:59:30 +0000
commitc70bf3ea28cdf6bafd8571690d3e5c466a0658a2 (patch)
tree68b24940e433f3f9c278b054d9ea1622389bd332 /qpid/python/examples
parentfcdf1723c7b5cdf0772054a93edb6e7d97c4bb1e (diff)
downloadqpid-python-c70bf3ea28cdf6bafd8571690d3e5c466a0658a2.tar.gz
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
Diffstat (limited to 'qpid/python/examples')
-rwxr-xr-xqpid/python/examples/api/spout4
1 files changed, 4 insertions, 0 deletions
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)