framework:
    messenger:
        transports:
            # Producers
            business_event:
                dsn: 'gps:'
                options:
                    project_id: '%env(GOOGLE_CLOUD_PROJECT)%'
                    topic_name: '%env(PUBSUB_TOPIC_BUSINESS_EVENT)%'
                    subscription_name: '%env(PUBSUB_SUBSCRIPTION_BUSINESS_EVENT)%'
                    auto_setup: '%env(bool:PUBSUB_AUTO_SETUP)%'
                retry_strategy:
                    max_retries: 0
                serializer: pim_enrich.messenger.serializer.business_event

            # Consumers
            webhook:
                dsn: 'gps:'
                options:
                    project_id: '%env(GOOGLE_CLOUD_PROJECT)%'
                    topic_name: '%env(PUBSUB_TOPIC_BUSINESS_EVENT)%'
                    subscription_name: '%env(PUBSUB_SUBSCRIPTION_WEBHOOK)%'
                    auto_setup: '%env(bool:PUBSUB_AUTO_SETUP)%'
                retry_strategy:
                    max_retries: 0
                serializer: pim_enrich.messenger.serializer.business_event

            ui_job:
                dsn: 'gps:'
                options:
                    project_id: '%env(GOOGLE_CLOUD_PROJECT)%'
                    topic_name: '%env(PUBSUB_TOPIC_JOB_QUEUE_UI)%'
                    subscription_name: '%env(PUBSUB_SUBSCRIPTION_JOB_QUEUE_UI)%'
                    auto_setup: '%env(bool:PUBSUB_AUTO_SETUP)%'
                retry_strategy:
                    max_retries: 0
                serializer: akeneo_batch_queue.messenger.serializer
            import_export_job:
                dsn: 'gps:'
                options:
                    project_id: '%env(GOOGLE_CLOUD_PROJECT)%'
                    topic_name: '%env(PUBSUB_TOPIC_JOB_QUEUE_IMPORT_EXPORT)%'
                    subscription_name: '%env(PUBSUB_SUBSCRIPTION_JOB_QUEUE_IMPORT_EXPORT)%'
                    auto_setup: '%env(bool:PUBSUB_AUTO_SETUP)%'
                retry_strategy:
                    max_retries: 0
                serializer: akeneo_batch_queue.messenger.serializer
            data_maintenance_job:
                dsn: 'gps:'
                options:
                    project_id: '%env(GOOGLE_CLOUD_PROJECT)%'
                    topic_name: '%env(PUBSUB_TOPIC_JOB_QUEUE_DATA_MAINTENANCE)%'
                    subscription_name: '%env(PUBSUB_SUBSCRIPTION_JOB_QUEUE_DATA_MAINTENANCE)%'
                    auto_setup: '%env(bool:PUBSUB_AUTO_SETUP)%'
                retry_strategy:
                    max_retries: 0
                serializer: akeneo_batch_queue.messenger.serializer

        routing:
            'Akeneo\Platform\Component\EventQueue\Event': business_event
            'Akeneo\Platform\Component\EventQueue\BulkEvent': business_event
            'Akeneo\Tool\Component\BatchQueue\Queue\UiJobExecutionMessage': ui_job
            'Akeneo\Tool\Component\BatchQueue\Queue\ImportJobExecutionMessage': import_export_job
            'Akeneo\Tool\Component\BatchQueue\Queue\ExportJobExecutionMessage': import_export_job
            'Akeneo\Tool\Component\BatchQueue\Queue\DataMaintenanceJobExecutionMessage': data_maintenance_job
