services:

  # Queue Task Dispatcher.
  printed.bundle.queue.service.queue_task_dispatcher:
    class: 'Printed\Bundle\Queue\Service\QueueTaskDispatcher'
    arguments:
      - '@doctrine.orm.entity_manager'
      - '@monolog.logger.queue'
      - '@validator'
      - '@service_container'

  # Queue Maintenance Manager.
  printed.bundle.queue.service.queue_maintenance:
    class: 'Printed\Bundle\Queue\Service\QueueMaintenance'
    arguments:
      - '@container'
      - '@%rabbitmq-queue-bundle.queue_maintenance_strategy.service_name%'

  printed.bundle.queue.service.queue_maintenance.filesystem_queue_maintenance_strategy:
    class: 'Printed\Bundle\Queue\Service\QueueMaintenance\FilesystemQueueMaintenanceStrategy'
    arguments:
      - '%kernel.cache_dir%'

  # Vhost existence ensurer.
  printed.bundle.queue.service.rabbit_mq_vhost_existence_ensurer:
    class: 'Printed\Bundle\Queue\Service\RabbitMqVhostExistenceEnsurer'
    arguments:
      - '@logger'
      - '%rabbitmq-queue-bundle.rabbitmq_user%'
      - '%rabbitmq-queue-bundle.rabbitmq_password%'
      - '%rabbitmq-queue-bundle.rabbitmq_vhost%'
      - '%rabbitmq-queue-bundle.rabbitmq_api_base_url%'

  # UUID service.
  printed.bundle.queue.service.uuid:
    class: 'Ramsey\Uuid\UuidFactory'

services:

  # Queue Task Dispatcher.
  printed.bundle.queue.service.queue_task_dispatcher:
    class: 'Printed\Bundle\Queue\Service\QueueTaskDispatcher'
    arguments:
      - '@doctrine.orm.entity_manager'
      - '@monolog.logger.queue'
      - '@validator'
      - '@service_container'

  # Queue Maintenance Manager.
  printed.bundle.queue.service.queue_maintenance:
    class: 'Printed\Bundle\Queue\Service\QueueMaintenance'
    arguments:
      - '@service_container'
      - '@%rabbitmq-queue-bundle.queue_maintenance_strategy.service_name%'

  printed.bundle.queue.service.queue_maintenance.filesystem_queue_maintenance_strategy:
    class: 'Printed\Bundle\Queue\Service\QueueMaintenance\FilesystemQueueMaintenanceStrategy'
    arguments:
      - '%kernel.cache_dir%'

  # Vhost existence ensurer.
  printed.bundle.queue.service.rabbit_mq_vhost_existence_ensurer:
    class: 'Printed\Bundle\Queue\Service\RabbitMqVhostExistenceEnsurer'
    arguments:
      - '@logger'
      - '%rabbitmq-queue-bundle.rabbitmq_user%'
      - '%rabbitmq-queue-bundle.rabbitmq_password%'
      - '%rabbitmq-queue-bundle.rabbitmq_vhost%'
      - '%rabbitmq-queue-bundle.rabbitmq_api_base_url%'

  # UUID service.
  printed.bundle.queue.service.uuid:
    class: 'Ramsey\Uuid\UuidFactory'

Add queue maintenance cache strategy.
Add queue maintenance cache strategy.

Part 4. Broken state.
