Skip to content

Commit

Permalink
feat: remove auto delete flag, message delivery persistent mode
Browse files Browse the repository at this point in the history
  • Loading branch information
d3nbr0 committed Jan 16, 2025
1 parent 80d08d3 commit 9d1db9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiocarrot/carrot.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def send(self, _cnm: str, **kwargs) -> 'ConfirmationFrameType':
payload = ujson.dumps(message_body).encode()

return await channel.default_exchange.publish(
message=aio_pika.Message(body=payload),
message=aio_pika.Message(body=payload, delivery_mode=aio_pika.DeliveryMode.PERSISTENT),
routing_key=self._queue_name,
)

Expand Down Expand Up @@ -191,7 +191,7 @@ async def _get_queue(self) -> 'aio_pika.abc.AbstractQueue':

if not self._queue:
channel = await self._get_channel()
self._queue = await channel.declare_queue(self._queue_name, durable=True, auto_delete=True)
self._queue = await channel.declare_queue(self._queue_name, durable=True)

return self._queue

Expand Down

0 comments on commit 9d1db9e

Please sign in to comment.