framework:
  messenger:
    serializer:
      default_serializer: messenger.transport.symfony_serializer
      symfony_serializer:
        format: json
        context:
          disable_type_enforcement: true
    # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
    failure_transport: failed
    buses:
      messenger.bus.default:
        # and/or add your own
        middleware:
          - 'App\Middleware\SignatureMiddleware'
    transports:
      failed: 'doctrine://default?queue_name=failed'
      transactions:
        dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
        retry_strategy:
          max_retries: 1
          delay: 1000
          multiplier: 1
          max_delay: 0
        options:
          exchange:
            name: transactions
          queues:
            transactions: ~
          cacert: '/var/task/cert.pem'
          key: '/var/task/key.pem'
          verify: fasle
      notifications:
        dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
        retry_strategy:
          max_retries: 1
          delay: 1000
          multiplier: 1
          max_delay: 0
        options:
          exchange:
            name: notifications
          queues:
            notifications: ~
          cacert: '/var/task/cert.pem'
          key: '/var/task/key.pem'
          verify: fasle
      topup:
        dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
        retry_strategy:
          max_retries: 0
          delay: 1000
          multiplier: 1
          max_delay: 0
        options:
          exchange:
            name: topup
          queues:
            topup: ~
          cacert: '/var/task/cert.pem'
          key: '/var/task/key.pem'
          verify: fasle
      transactions_v2:
        dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
        retry_strategy:
          max_retries: 0
          delay: 1000
          multiplier: 1
          max_delay: 0
        options:
          exchange:
            name: transactions-v2
          queues:
            transactions-v2: transactions-v2
          cacert: '/var/task/cert.pem'
          key: '/var/task/key.pem'
          verify: fasle
    routing:
      # Route your messages to the transports
      'App\Message\TransactionMessage': transactions
      'App\Dto\Request\TransactionV2\TransactionMessageDto': transactions_v2
      'App\Message\NotificationMessage': notifications
      'App\Message\TopUpMessage': topup