Pubsub published messages not appearing consistently

I am working on code where we have a graphql subscription setup and an elm page subscribing to that subscription. When developing locally, messages published to that socket get delivered to the browser and I see that browser react.

When I test on staging, where potentially other developers are also active on that page subscribed to the same topic, it looks like I am not always receiving the socket messages that I would expect. My current wild speculation is that the pubsub is delivering to only one of the browsers instead of all subscribed browsers. I am considering trying to prove this by having multiple people leave the page open and seeing if all browsers get the expected message…if anybody has any experience with troubleshooting this, I am curious to hear what they have done

1 Like

I might include the commit sha in the topic name to isolate my staging branch further.

I’ll try the lucky shot… Maybe you’re not broadcasting?


So, it looks like an error in elm initialization. It only happens when we load our app in advanced initialization sequence. It looks like the app drops the socket connections during this initialization. I have a work around for now. I will dig into fixing this later.