diff --git a/buildout.cfg b/buildout.cfg
index 2e535be..d8cec7f 100644
--- a/buildout.cfg
+++ b/buildout.cfg
@@ -36,7 +36,7 @@ zope-conf-additional =
%import sauna.reload
%import collective.zamqp
- connection_id demo
+ connection_id superuser
# hostname localhost
# virtual_host /
# username guest
@@ -44,11 +44,20 @@ zope-conf-additional =
heartbeat 120
keepalive 30
+
+ connection_id anonymous
+ heartbeat 120
+ keepalive 30
+
- connection_id demo
+ connection_id superuser
site_id Plone
user_id admin
+
+ connection_id anonymous
+ site_id Plone
+
zserver-threads = 4
# that's much more threads than necessary, but that way you'll see
# that collectice.zamqp manages with simultaneous threads
@@ -59,7 +68,7 @@ zope-conf-additional =
%import sauna.reload
%import collective.zamqp
- connection_id demo
+ connection_id superuser
# hostname localhost
# virtual_host /
# username guest
@@ -67,6 +76,11 @@ zope-conf-additional =
heartbeat 240
keepalive 60
+
+ connection_id anonymous
+ heartbeat 240
+ keepalive 60
+
zserver-threads = 4
[zamqp-consumer]
@@ -74,7 +88,7 @@ zope-conf-additional =
%import sauna.reload
%import collective.zamqp
- connection_id demo
+ connection_id superuser
# hostname localhost
# virtual_host /
# username guest
@@ -82,13 +96,22 @@ zope-conf-additional =
heartbeat 120
keepalive 30
+
+ connection_id anonymous
+ heartbeat 120
+ keepalive 30
+
- connection_id demo
+ connection_id superuser
site_id Plone
user_id admin
+
+ connection_id anonymous
+ site_id Plone
+
zserver-threads = 1
-# in production, use zserver-threads = 1
+# in production, it's recommended to use zserver-threads = 1
[ports]
zeoserver = 8800
diff --git a/src/collective/zamqpdemo/autopublish.py b/src/collective/zamqpdemo/autopublish.py
index 6f4079d..6d5f492 100644
--- a/src/collective/zamqpdemo/autopublish.py
+++ b/src/collective/zamqpdemo/autopublish.py
@@ -36,7 +36,7 @@ class AutoPublishProducer(Producer):
"""Produces auto-publishing requests"""
grok.name("amqpdemo.autopublish")
- connection_id = "demo"
+ connection_id = "superuser"
serializer = "plain"
queue = "amqpdemo.autopublish.wait"
@@ -54,7 +54,7 @@ class AutoPublishConsumer(Consumer):
"""Consumes auto-publishing requests"""
grok.name("amqpdemo.autopublish") # is also the queue name
- connection_id = "demo"
+ connection_id = "superuser"
marker = IAutoPublishMessage
durable = False
diff --git a/src/collective/zamqpdemo/content.py b/src/collective/zamqpdemo/content.py
index 6c51ff5..4269924 100644
--- a/src/collective/zamqpdemo/content.py
+++ b/src/collective/zamqpdemo/content.py
@@ -48,7 +48,7 @@ class CreateItemProducer(Producer):
"""Produces item creation requests"""
grok.name("amqpdemo.create") # is also the routing key
- connection_id = "demo"
+ connection_id = "superuser"
serializer = "msgpack"
queue = "amqpdemo.create"
@@ -59,7 +59,7 @@ class DeleteItemProducer(Producer):
"""Produces item deletion requests"""
grok.name("amqpdemo.delete") # is also the routing key
- connection_id = "demo"
+ connection_id = "superuser"
serializer = "msgpack"
queue = "amqpdemo.delete"
@@ -70,7 +70,7 @@ class CreateItemConsumer(Consumer):
"""Consumes item creation messages"""
grok.name("amqpdemo.create") # is also the queue name
- connection_id = "demo"
+ connection_id = "superuser"
marker = ICreateItemMessage
durable = False
@@ -80,7 +80,7 @@ class DeleteItemConsumer(Consumer):
"""Consumes item deletion messages"""
grok.name("amqpdemo.delete") # is also the queue name
- connection_id = "demo"
+ connection_id = "superuser"
marker = IDeleteItemMessage
durable = False
diff --git a/src/collective/zamqpdemo/message.py b/src/collective/zamqpdemo/message.py
index d5a3d0f..588a17f 100644
--- a/src/collective/zamqpdemo/message.py
+++ b/src/collective/zamqpdemo/message.py
@@ -34,10 +34,11 @@ class QueueMessageProducer(Producer):
"""Produces queue message command"""
grok.name("amqpdemo.messages")
- connection_id = "demo"
+ connection_id = "superuser"
exchange = "awaiting"
serializer = "plain"
+ auto_delete = False
durable = False
@property
@@ -53,7 +54,7 @@ class AwaitingMessages(Consumer):
"""Consumes purge-requests"""
grok.name("amqpdemo.${site_id}.awaiting") # is also the queue name
- connection_id = "demo"
+ connection_id = "superuser"
exchange = "awaiting"
queue_arguments = {
"x-dead-letter-exchange": "messages", # redirect messages with reject
@@ -61,6 +62,7 @@ class AwaitingMessages(Consumer):
routing_key = "amqpdemo.${site_id}.messages"
marker = IMessage
+ auto_delete = False
durable = False
def on_ready_to_consume(self):
@@ -72,7 +74,7 @@ class MessageConsumer(Consumer):
"""Consumes purge-requests"""
grok.name("amqpdemo.${site_id}.messages") # is also the queue name
- connection_id = "demo"
+ connection_id = "superuser"
exchange = "messages"
queue = "" # use generated queue name
routing_key = "amqpdemo.${site_id}.messages"
diff --git a/src/collective/zamqpdemo/minutes.py b/src/collective/zamqpdemo/minutes.py
index b160e9b..e358b8f 100644
--- a/src/collective/zamqpdemo/minutes.py
+++ b/src/collective/zamqpdemo/minutes.py
@@ -78,7 +78,7 @@ class MinutesProducer(Producer):
"""Produces requests for PDF"""
grok.name("amqpdemo.minutes") # is also the routing key
- connection_id = "demo"
+ connection_id = "superuser"
queue = "amqpdemo.minutes"
serializer = "plain"
@@ -89,7 +89,7 @@ class MinutesConsumer(Consumer):
"""Consumes requests for PDF"""
grok.name("amqpdemo.minutes") # is also the queue name
- connection_id = "demo"
+ connection_id = "superuser"
marker = IMinutesMessage
durable = False