4

When I try to run dramatiq from the command line, it gives me the below error. I'm currently using RabbitMQ.

[Thread-2] [dramatiq.worker.ConsumerThread(default)] [CRITICAL] Consumer encountered a connection error: (406, "PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-routing-key'for queue 'default' in vhost '/': received the value 'default.XQ' of type 'longstr' but current is none")

This is what I have done until now.

import dramatiq
from dramatiq import get_logger


logger = get_logger(__name__)

@dramatiq.actor
    def myfunction():
LEE
  • 3,335
  • 8
  • 40
  • 70

1 Answers1

0

Did you start the RabbitMQ Server? I got the same error as you, I fixed it by starting the RabbitMQ broker server first, before running the worker. The RabbitMQ server is in a package called rabbitmq-server in the Advanced Package Tool. But maybe different in other package managers.