4545using RabbitMQ . Client . Events ;
4646using RabbitMQ . Client . Exceptions ;
4747using RabbitMQ . Client . Framing . Impl ;
48- using RabbitMQ . Util ;
4948
5049namespace RabbitMQ . Client . Impl
5150{
@@ -75,10 +74,11 @@ internal abstract class ChannelBase : IChannel, IRecoverable
7574 internal readonly IConsumerDispatcher ConsumerDispatcher ;
7675
7776 protected ChannelBase ( ConnectionConfig config , ISession session ,
78- ushort consumerDispatchConcurrency = Constants . DefaultConsumerDispatchConcurrency )
77+ ushort ? perChannelConsumerDispatchConcurrency = null )
7978 {
8079 ContinuationTimeout = config . ContinuationTimeout ;
81- ConsumerDispatcher = BuildConsumerDispatcher ( config , consumerDispatchConcurrency ) ;
80+ ConsumerDispatcher = new AsyncConsumerDispatcher ( this ,
81+ perChannelConsumerDispatchConcurrency . GetValueOrDefault ( config . ConsumerDispatchConcurrency ) ) ;
8282 Action < Exception , string > onException = ( exception , context ) =>
8383 OnCallbackException ( CallbackExceptionEventArgs . Build ( exception , context ) ) ;
8484 _basicAcksWrapper = new EventingWrapper < BasicAckEventArgs > ( "OnBasicAck" , onException ) ;
@@ -94,12 +94,6 @@ protected ChannelBase(ConnectionConfig config, ISession session,
9494 Session = session ;
9595 }
9696
97- private IConsumerDispatcher BuildConsumerDispatcher ( ConnectionConfig config , ushort perChannelConsumerDispatchConcurrency )
98- {
99- ushort cdc = Misc . DetermineConsumerDispatchConcurrency ( config , perChannelConsumerDispatchConcurrency ) ;
100- return new AsyncConsumerDispatcher ( this , cdc ) ;
101- }
102-
10397 internal TimeSpan HandshakeContinuationTimeout { get ; set ; } = TimeSpan . FromSeconds ( 10 ) ;
10498 public TimeSpan ContinuationTimeout { get ; set ; }
10599
0 commit comments