Skip to content

Brokers

Arrlio has two builtin brokers:

  • arrlio.backends.brokers.local
  • arrlio.backends.brokers.rabbitmq

Local

Settings

All environment varialbles should starts with ${ARRLIO_ENV_PREFIX}LOCAL_BROKER_.

Info

Default value for ARRLIO_ENV_PREFIX is ARRLIO_.

  • ID (Config.id), default: autogenerated. Broker Id.

RabbitMQ

Settings

All environment varialbles should starts with ${ARRLIO_ENV_PREFIX}RABBITMQ_BROKER_.

  • ID (Config.id), default: autogenerated. Broker Id.
  • SERIALIZER (Config.serializer), default: "arrlio.serializers.json". Serializer module with Serializer and Config classes.
  • URL (Config.url), default: "amqp://guest:guest@localhost". RabbitMQ server url.
  • TIMEOUT (Config.timeout), default: 10. RabbitMQ operation timeout, seconds.
  • PUSH_RETRY_TIMEOUTS (Config.push_retry_timeouts), default: [5, 5, 5, 5, 5]. Retry timeout sequense for push operations, seconds.
  • PULL_RETRY_TIMEOUTS (Config.pull_retry_timeouts), default: itertools.repeat(5). Retry timeout sequense for pull operations, seconds.
  • EXCHANGE (Config.exchange), default: "arrlio". RabbitMQ exchange for tasks.
  • EXCHANGE_DURABLE (Config.exchange_durable), default: False.
  • QUEUE_TYPE (Config.queue_type), default: QueueType.CLASSIC.
  • QUEUE_DURABLE (Config.queue_durable), default: False.
  • QUEUE_AUTO_DELETE (Config.queue_auto_delete), default: True.
  • QUEUE_TTL (Config.queue_ttl), default: None. x-message-ttl RabbitMQ option, seconds.
  • PREFETCH_COUNT (Config.prefetch_count), default: 1. RabbitMQ prefetch count options.
  • TASK_TTL (Config.task_ttl), default: 600. x-message-ttl RabbitMQ option, seconds.