-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi Jayden. I see that #15 already raises this question and that you have a related pr already open. I just want to confirm that the following behavior is expected, and that I'm not overlooking something.
- Some number, let's say 4, websocket connections are open, and therefore 4
GraphqlSubscriptionConsumerinstances exist. - They each execute a schema with a subscription that resolves an event that's triggered by a model save signal and piped via the root stream. (So far so good.)
- When that signal is fired, each consumer receives a channel notification and calls
on_nexton the shared stream, and 4 events are pushed on to the stream. - Because the stream is shared by all the consumers and their schemas, each subscription ends up resolving 4, rather than 1, events.
This seems like a bug to me, but since, in your reply to #15 (specifically to this point: "Aside from that, wouldn't stream_fired be called on the same event for each open websocket and cause the event to be delivered extra times to each consumer?"), you don't explicitly address the issue, I'm not certain I'm not missing something. Moreover, in your pr, correct me if I'm misunderstanding, it seems like since groups share a stream, resolvers subscribed to the same group will still receive 1 * (n open consumers publishing to the same group) event objects for each actual event. Am I missing something?
Thank you --