I have 3 Symfony projets. All are using the same user entity but have 3 different databases (1 per project).
I want to replicate data when one of the project is editing / creating / deleting a user.
So I have a message broker (RabbitMQ).
The desired behavior I want to have is this:
- When project 1 is sending a message, project 2 and 3 reads it, but 1 not
- When project 2 is sending a message, project 1 and 3 reads it, but 2 not
- When project 3 is sending a message, project 1 and 2 reads it, but 3 not
But actually, when I’m sending a message (from 1 or 2 or 3), the project itself also reads the message…
This is my configuration:
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
serializer:
default_serializer: messenger.transport.symfony_serializer
symfony_serializer:
format: json
context: { }
transports:
sso:
dsn: '%env(TRANSPORT)%/sso'
serializer: messenger.transport.symfony_serializer
options:
exchange:
name: my_fanout
queues:
queue1: ~
routing:
# Route your messages to the transports
'AcmeCoreBundleMessageCreatedCreatedUserNotification': sso
What I missed? Does anyone have an idea?