@@ -53,7 +53,7 @@ public sealed class CreateChannelOptions
5353 /// <see cref="IChannel.GetNextPublishSequenceNumberAsync(System.Threading.CancellationToken)"/> to allow correlation
5454 /// of the response with the correct message.
5555 /// </summary>
56- public bool PublisherConfirmationsEnabled { get ; set ; } = false ;
56+ public readonly bool PublisherConfirmationsEnabled = false ;
5757
5858 /// <summary>
5959 /// Should this library track publisher confirmations for you? Defaults to <c>false</c>
@@ -63,7 +63,7 @@ public sealed class CreateChannelOptions
6363 /// If the broker then sends a <c>basic.return</c> response for the message, this library can
6464 /// then correctly handle the message.
6565 /// </summary>
66- public bool PublisherConfirmationTrackingEnabled { get ; set ; } = false ;
66+ public readonly bool PublisherConfirmationTrackingEnabled = false ;
6767
6868 /// <summary>
6969 /// If the publisher confirmation tracking is enabled, this represents the rate limiter used to
@@ -72,7 +72,7 @@ public sealed class CreateChannelOptions
7272 /// Defaults to a <see cref="ThrottlingRateLimiter"/> with a limit of 128 and a throttling percentage of 50% with a delay during throttling.
7373 /// </summary>
7474 /// <remarks>Setting the rate limiter to <c>null</c> disables the rate limiting entirely.</remarks>
75- public RateLimiter ? OutstandingPublisherConfirmationsRateLimiter { get ; set ; } = new ThrottlingRateLimiter ( 128 ) ;
75+ public readonly RateLimiter ? OutstandingPublisherConfirmationsRateLimiter = new ThrottlingRateLimiter ( 128 ) ;
7676
7777 /// <summary>
7878 /// Set to a value greater than one to enable concurrent processing. For a concurrency greater than one <see cref="IAsyncBasicConsumer"/>
@@ -84,10 +84,17 @@ public sealed class CreateChannelOptions
8484 /// For concurrency greater than one this removes the guarantee that consumers handle messages in the order they receive them.
8585 /// In addition to that consumers need to be thread/concurrency safe.
8686 /// </summary>
87- public ushort ? ConsumerDispatchConcurrency { get ; set ; } = null ;
87+ public readonly ushort ? ConsumerDispatchConcurrency = null ;
8888
89- public CreateChannelOptions ( )
89+ public CreateChannelOptions ( bool publisherConfirmationsEnabled ,
90+ bool publisherConfirmationTrackingEnabled ,
91+ RateLimiter ? outstandingPublisherConfirmationsRateLimiter = null ,
92+ ushort ? consumerDispatchConcurrency = Constants . DefaultConsumerDispatchConcurrency )
9093 {
94+ PublisherConfirmationsEnabled = publisherConfirmationsEnabled ;
95+ PublisherConfirmationTrackingEnabled = publisherConfirmationTrackingEnabled ;
96+ OutstandingPublisherConfirmationsRateLimiter = outstandingPublisherConfirmationsRateLimiter ;
97+ ConsumerDispatchConcurrency = consumerDispatchConcurrency ;
9198 }
9299
93100 internal ushort InternalConsumerDispatchConcurrency
0 commit comments