public virtual Response processConsumerControl(ConsumerControl control) { return null; }
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(); } }
public void ConnectionInterruptProcessingComplete(ITransport transport, ConnectionId connectionId) { ConnectionState connectionState = null; if(connectionStates.TryGetValue(connectionId, out connectionState)) { connectionState.ConnectionInterruptProcessingComplete = true; lock(((ICollection) connectionState.RecoveringPullConsumers).SyncRoot) { foreach(KeyValuePair<ConsumerId, ConsumerInfo> entry in connectionState.RecoveringPullConsumers) { 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); } } } connectionState.RecoveringPullConsumers.Clear(); } } }