我为SignalR构建了一个自定义ScaleoutMessageBus
子类,以通过RabbitMQ总线传递消息。但是,我从SignalR得到以下异常:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.SZArrayHelper.get_Item[T](Int32 index)
at Microsoft.AspNet.SignalR.Messaging.ScaleoutMessageBus.OnReceivedCore(Int32 streamIndex, UInt64 id, ScaleoutMessage scaleoutMessage)
at Microsoft.AspNet.SignalR.Messaging.ScaleoutStreamManager.OnReceived(Int32 streamIndex, UInt64 id, ScaleoutMessage message)
at System.Threading.Tasks.Task.Execute()
会导致此异常的原因是什么?
答案 0 :(得分:0)
事实证明我需要覆盖StreamCount
以提供我正在使用的其他流号码。