So I’m creating a notificator project that gets a message from a rabbitmq queue connects to a certain topic in phoenix, and pushes the message to the server to be broadcasted
But if my app for some reason is down when the message is published and I have more than one message for the same topic, like:
[message 1 | topic 1]
[message 2 | topic 1]
[message 3 | topic 1]
when my app starts again, the messages will be read and sent to the corresponding phoenix channel, but the channel just broadcasts the message 3 and basically ignores the previous ones
While investigating, I thought It may be related to this warning:[debug] Duplicate channel join for topic “room:2025” in NotifierWeb.NotificationSocket. Closing existing channel for new join.
But when I put an if statement to see if is already joined the channel, the socket when already joined for the first time still doesn’t broadcast the message
my current code in consumer looks like this:
(consumer.ex · GitHub)
And my channel looks like this:
channel.ex · GitHub
Has anyone ever experienced something like this before?