@@ -84,19 +84,14 @@ public DataConverter DataConverter
8484 public TimeSpan MaximumTimerInterval { get ; set ; } = TimeSpan . FromDays ( 3 ) ;
8585
8686 /// <summary>
87- /// Gets or sets the maximum number of concurrent activity work items that can be processed by the worker.
87+ /// Gets options for the Durable Task worker concurrency .
8888 /// </summary>
89- public int MaximumConcurrentActivityWorkItems { get ; set ; } = 100 * Environment . ProcessorCount ;
90-
91- /// <summary>
92- /// Gets or sets the maximum number of concurrent orchestration work items that can be processed by the worker.
93- /// </summary>
94- public int MaximumConcurrentOrchestrationWorkItems { get ; set ; } = 100 * Environment . ProcessorCount ;
95-
96- /// <summary>
97- /// Gets or sets the maximum number of concurrent entity work items that can be processed by the worker.
98- /// </summary>
99- public int MaximumConcurrentEntityWorkItems { get ; set ; } = 100 * Environment . ProcessorCount ;
89+ /// <remarks>
90+ /// Worker concurrency options control how many work items of a particular type (e.g., orchestration, activity,
91+ /// or entity) can be processed concurrently by the worker. It is recommended to set these values based on the
92+ /// expected workload and the resources available on the machine running the worker.
93+ /// </remarks>
94+ public ConcurrencyOptions Concurrency { get ; } = new ( ) ;
10095
10196 /// <summary>
10297 /// Gets a value indicating whether <see cref="DataConverter" /> was explicitly set or not.
@@ -123,4 +118,25 @@ internal void ApplyTo(DurableTaskWorkerOptions other)
123118 other . EnableEntitySupport = this . EnableEntitySupport ;
124119 }
125120 }
121+
122+ /// <summary>
123+ /// Options for the Durable Task worker concurrency.
124+ /// </summary>
125+ public class ConcurrencyOptions
126+ {
127+ /// <summary>
128+ /// Gets or sets the maximum number of concurrent activity work items that can be processed by the worker.
129+ /// </summary>
130+ public int MaximumConcurrentActivityWorkItems { get ; set ; } = 100 * Environment . ProcessorCount ;
131+
132+ /// <summary>
133+ /// Gets or sets the maximum number of concurrent orchestration work items that can be processed by the worker.
134+ /// </summary>
135+ public int MaximumConcurrentOrchestrationWorkItems { get ; set ; } = 100 * Environment . ProcessorCount ;
136+
137+ /// <summary>
138+ /// Gets or sets the maximum number of concurrent entity work items that can be processed by the worker.
139+ /// </summary>
140+ public int MaximumConcurrentEntityWorkItems { get ; set ; } = 100 * Environment . ProcessorCount ;
141+ }
126142}
0 commit comments