Files
Mangarr/config/packages/messenger.yaml
2025-02-07 11:56:51 +01:00

46 lines
1.5 KiB
YAML

framework:
messenger:
default_bus: command.bus
# Transports
transports:
commands:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
queue_name: commands
events:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
queue_name: events
# Buses configuration
buses:
command.bus:
middleware:
- validation
- doctrine_transaction
event.bus:
default_middleware: allow_no_handlers
# Message routing
routing:
# Commands
'App\Domain\Scraping\Application\Command\ScrapeChapter': commands
# Events
'App\Domain\Scraping\Domain\Event\ChapterScrapingStarted': events
'App\Domain\Scraping\Domain\Event\ChapterScrapingCompleted': events
'App\Domain\Scraping\Domain\Event\ChapterScrapingFailed': events
# Legacy messages (à garder si nécessaire)
'App\Message\DownloadChapter': commands
'App\Message\RefreshMetadata': commands
'App\Message\RefreshAndDownloadChapters': commands
# when@test:
# framework:
# messenger:
# transports:
# # replace with your transport name here (e.g., my_transport: 'in-memory://')
# # For more Messenger testing tools, see https://github.com/zenstruck/messenger-test
# async: 'in-memory://'