SignalR上的自定义扩展总线会导致异常

时间:2013-08-16 14:53:15

标签: c# asp.net signalr

我为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()

会导致此异常的原因是什么?

1 个答案:

答案 0 :(得分:0)

事实证明我需要覆盖StreamCount以提供我正在使用的其他流号码。