On the issue of activation execution timing for flow IQueCacheCursor
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 354
Description
One observed phenomenon is that streams always create IQueueCacheCursor only after pulling messages.
We customize a rewindable stream provider and implement IQueueCacheCursor.
We observe that IQueueCacheCursor is not created when a user subscribes to StreamId, But performed IQueueAdapterReceiver. GetQueueMessagesAsync (maxcount) no new data to return to the list (0). (ps: we have no choice as rewindable flow user modify offset, This may result in new messages not being processed in a timely manner).
Because QueueCacheCursor is not actually executed, subscribers do not receive any messages.
I think if a subscriber has subscribed, it should create IQueueCacheCursor for its creation and perform MoveNext to verify that the cache exists. If not, Dispose. I think that's reasonable.
And it does not introduce a heavy burden to the system.
thank you
The logic of our IQueueCacheCursor is to first check whether the PooledQueueCache has a cache;
If yes => Follow the default logic
No => First check if the message exists and try to load the message to the service, then provide the consumer with a fallback message.
If you have other suggestions, please comment. Thank you very much.
Contributor guide
Research direction
Start by tracing subscriptions through IQueueCacheCursor and IQueueAdapterReceiver.GetQueueMessagesAsync, then inspect how PooledQueueCache handles an empty result for a rewindable provider. Reproduce the subscription and message-loading scenario described in the issue. Done should be defined by the maintainers, including whether cursor creation and MoveNext should occur immediately after subscription.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100