orleans
orleans copied to clipboard
StreamSubscriptionManager Throws ArgumentException when StreamIdentifier has null namespace
@jason-bragg @xiazen The StreamSubscription manager's GetSubscriptions method throws a ArgumentException when the namespace of the StreamIdentity is null for the StreamIdentitiy that is passed into the method.
Steps to reproduce the problem: In a IBootstrapProvider's init method do the following.
IStreamSubscriptionManager subscriptionManager = providerRuntime.ServiceProvider.GetService<IStreamSubscriptionManagerAdmin>()
.GetStreamSubscriptionManager(StreamSubscriptionManagerType.ExplicitSubscribeOnly);
var streamIdentity = new StreamIdentity(context.GetStreamId(), "sinkhost");
var currentSubscriptions = await subscriptionManager.GetSubscriptions(context.GetStreamProviderName(), streamIdentity);
The Exception:
System.AggregateException occurred
HResult=0x80131500
Message=One or more errors occurred.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Orleans.Streams.Core.StreamSubscriptionManager.<>c.<GetSubscriptions>b__5_0(Task`1 subs)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
...
Inner Exception 1:
ArgumentException: The stream ID doesn't have an associated namespace.
Parameter name: streamId
Thanks for reporting, we will fix it and include it in our next release
fixed by #3843