orleans icon indicating copy to clipboard operation
orleans copied to clipboard

[Question] EventHub stream not all consumers receiving events instantly

Open justmara opened this issue 7 years ago • 6 comments

We have a stream per order with some (10+) consumers all marked with ImplicitStreamSubscription attribute. Sometimes we see in logs that after event were sent to stream only few consumers receive it instantly. Others are hung until next event comes. Something like this:

13:07:02.251 event 'First' sent to stream 13:07:02.258 event 'First' received by GrainA ... 13:32:23.054 event 'Second' sent to stream 13:32:23.200 event 'First' received by GrainB 13:32:23.200 event 'Second' received by GrainA 13:32:23.283 event 'Second' received by GrainB

So 25 minutes passed since GrainA received event from stream without any impact on GrainB. And only when new event (Second) was sent - GrainB was triggered and received both these events. How could that happen? That's not a throttling, because event's message already read from stream provider, parsed but delivered only to one of consumers. The confusing part here is that 'Second' event is delivered to GrainA same millisecond as 'First' delivered to GrainB. Like if GranB were to trigger for 'Second' event, but found 'First' in queue ahead, forgotten for some reason, and triggered now by FIFO principle. Logs shows that grains are instatiated on different silos. GrainA lives on same silo where producer ran.

justmara avatar May 27 '19 11:05 justmara

What stream provider are you using here?

sergeybykov avatar May 28 '19 15:05 sergeybykov

@sergeybykov as I've mentioned in title - it's an EventHub stream provider

justmara avatar May 28 '19 17:05 justmara

Sorry, I missed that.

(10+) consumers all marked with ImplicitStreamSubscription attribute.

Are they all different grain classes?

What version is this?

sergeybykov avatar May 28 '19 17:05 sergeybykov

Yes, all different classes and different interfaces. Version is 2.3.2 on netcore 2.2 @ ubuntu

justmara avatar May 28 '19 17:05 justmara

Any logs indicating GrainB had issue activating?

what you saw is weird. The guesses in my mind is, maybe GrainB had issue activating, hence it is receiving events much later

xiazen avatar Jul 12 '19 21:07 xiazen

Closing due to inactivity for now. Feel free to reopen.

sergeybykov avatar Aug 15 '19 21:08 sergeybykov