Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions kombu/pidbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def get_reply_queue(self):
f'{oid}.{self.reply_exchange.name}',
exchange=self.reply_exchange,
routing_key=oid,
durable=False,
durable=True,
auto_delete=True,
expires=self.reply_queue_expires,
message_ttl=self.reply_queue_ttl,
Expand All @@ -250,7 +250,7 @@ def get_queue(self, hostname):
return Queue(
f'{hostname}.{self.namespace}.pidbox',
exchange=self.exchange,
durable=False,
durable=True,
auto_delete=True,
expires=self.queue_expires,
message_ttl=self.queue_ttl,
Expand All @@ -269,9 +269,10 @@ def producer_or_acquire(self, producer=None, channel=None):
def _publish_reply(self, reply, exchange, routing_key, ticket,
channel=None, producer=None, **opts):
chan = channel or self.connection.default_channel
exchange = Exchange(exchange, exchange_type='direct',
delivery_mode='transient',
durable=False)
exchange = Exchange(exchange,
exchange_type='direct',
delivery_mode='persistent',
durable=True)
with self.producer_or_acquire(producer, chan) as producer:
try:
producer.publish(
Expand Down Expand Up @@ -395,14 +396,14 @@ def on_message(body, message):
def _get_exchange(self, namespace, type):
return Exchange(self.exchange_fmt % namespace,
type=type,
durable=False,
delivery_mode='transient')
durable=True,
delivery_mode='persistent')

def _get_reply_exchange(self, namespace):
return Exchange(self.reply_exchange_fmt % namespace,
type='direct',
durable=False,
delivery_mode='transient')
durable=True,
delivery_mode='persistent')

@property
def oid(self):
Expand Down
4 changes: 2 additions & 2 deletions kombu/transport/qpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def _has_queue(self, queue, **kwargs):
else:
return False

def queue_declare(self, queue, passive=False, durable=False,
def queue_declare(self, queue, passive=False, durable=True,
exclusive=False, auto_delete=True, nowait=False,
arguments=None):
"""Create a new queue specified by name.
Expand Down Expand Up @@ -708,7 +708,7 @@ def queue_delete(self, queue, if_unused=False, if_empty=False, **kwargs):
return
self._delete(queue)

def exchange_declare(self, exchange='', type='direct', durable=False,
def exchange_declare(self, exchange='', type='direct', durable=True,
**kwargs):
"""Create a new exchange.

Expand Down
Loading