public void ConnectionInterruptProcessingComplete(ITransport transport, ConnectionId connectionId)
{
ConnectionState connectionState = connectionStates[connectionId];
if(connectionState != null)
{
connectionState.ConnectionInterruptProcessingComplete = true;
Dictionary<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.RecoveringPullConsumers;
foreach(KeyValuePair<ConsumerId, ConsumerInfo> entry in stalledConsumers)
{
ConsumerControl control = new ConsumerControl();
control.ConsumerId = entry.Key;
control.Prefetch = entry.Value.PrefetchSize;
control.Destination = entry.Value.Destination;
try
{
if(Tracer.IsDebugEnabled)
{
Tracer.Debug("restored recovering consumer: " + control.ConsumerId +
" with: " + control.Prefetch);
}
transport.Oneway(control);
}
catch(Exception ex)
{
if(Tracer.IsDebugEnabled)
{
Tracer.Debug("Failed to submit control for consumer: " + control.ConsumerId +
" with: " + control.Prefetch + "Error: " + ex.Message);
}
}
}
stalledConsumers.Clear();
}
}