Laravel Echo repeating listen event for n times broadcast has been made

I am using Redis PubSub in the application I am currently building and have had to fight the same problem. While I don't know laravel-echo-server enough to advise you specifically on how to fix it, I can describe the likely reason for this symptom.

Your configuration is subscribing to the Redis channel on each cycle, and that subscription is not transient. Each time you subscribe, you create a new listener. Each time you publish, Redis sends the message to all listeners/subscribers. If a single client has subscribed three times, it will receive that message three times. You need to either recognize that you are subscribed and not duplicate it, or you need to unsubscribe after each cycle.

One thing to note is that the Redis instance should either publish or subscribe, but not both. laravel-echo-server is probably handling that for you.

Redis normally returns the number of subscribers receiving a message on each publish. This helped me diagnose the problem, especially since I am running private channels and should have 1, and only 1, listener for each message. Redis also has a "numsub" command that returns the number of listeners on a channel.

I noticed that your sendMessage function uses the listen method. It's a shot in the dark, but is that where you get multiple subscriptions?

Either way, I'd be glad to help further if you have a specific question that I can answer.