`Ignored RegisterAsStreamProducer Error` when migrating from SMS to MemoryStream
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 354
Description
Hello
I'm using Orleans 3.6.5. I tried to migrate from SMS to MemoryStream to be future proof, by changing
```
.AddSimpleMessageStreamProvider(InternalPubSubConfig.ProviderName, options =>
{
options.FireAndForgetDelivery = true;
options.OptimizeForImmutableData = true;
})
```
to
```
.AddMemoryStreams(
InternalPubSubConfig.ProviderName, options =>
{
// Number of pulling agent to start.
// DO NOT CHANGE this value once deployed, if you do rolling deployment
options.ConfigurePartitioning(numOfQueues: 8);
})
```
the problem is that, now, when I produce on the streams, I get this error (and nothing is produced on the stream)
```
[09:56:15.744 ERR Orleans.Streams.InternalPubSubProvider] Ignored RegisterAsStreamProducer Error
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Orleans.Streams.PersistentStreamPullingAgent.AddSubscriber_Impl(GuidId subscriptionId, StreamId streamId, IStreamConsumerExtension streamConsumer, StreamSequenceToken cacheToken, IStreamFilterPredicateWrapper filter) in /_/src/Orleans.Runtime/Streams/PersistentStream/PersistentStreamPullingAgent.cs:line 258
at Orleans.Streams.PersistentStreamPullingAgent.RegisterAsStreamProducer(StreamId streamId, StreamSequenceToken streamStartToken) in /_/src/Orleans.Runtime/Streams/PersistentStream/PersistentStreamPullingAgent.cs:line 826
```
I'm using (and need) explicit subscription.
Did I miss something during my migration?
Contributor guide
Research direction
Start by reading src/Orleans.Runtime/Streams/PersistentStream/PersistentStreamPullingAgent.cs at lines 258 and 826, where the reported exception occurs. Reproduce the migration from AddSimpleMessageStreamProvider to AddMemoryStreams with explicit subscription and verify that producing to the stream no longer logs the error and successfully produces messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100