Skip to content

PLAN 3.1

Brian Lehnen edited this page Apr 8, 2026 · 1 revision

phase: 02-core-usage plan: "3.1" wave: 3 dependencies: ["1.1", "2.1"] must_haves:

  • WorkerConfiguration.md does not mention AbortWorkerThreadsWhenStopping
  • TaskSchedulerConfiguration.md uses WaitForThreadPoolToFinish (correct spelling, double t)
  • ConsumerAsyncWorkGroup.md shows AddWorkGroup with 2 params (name, concurrencyLevel) not 3
  • ProducerConfiguration.md expanded from stub to list all configuration sections
  • ConsumerConfiguration.md includes MessageError configuration link
  • ConsumerAsyncConfiguration.md includes MessageError configuration entry files_touched:
  • WorkerConfiguration.md
  • TaskSchedulerConfiguration.md
  • ConsumerAsyncWorkGroup.md
  • ProducerConfiguration.md
  • ConsumerConfiguration.md
  • ConsumerAsyncConfiguration.md tdd: false

Plan 3.1 -- Configuration and Supporting Pages

Wave 3 -- Configuration pages. Depends on Plans 1.1 and 2.1. These pages document configuration for the consumer/producer pages updated in Wave 2.


Task 1: Fix WorkerConfiguration.md -- remove dead AbortWorkerThreadsWhenStopping content

The current `WorkerConfiguration.md` describes the behavior after `TimeToWaitForWorkersToCancel` as having two outcomes: "Abort the worker threads" or "Wait until all threads have died." The abort option references the removed `AbortWorkerThreadsWhenStopping` property conceptually even though the property name does not appear literally.

Make these changes:

  1. Replace the dual-outcome description (lines 23-29) for TimeToWaitForWorkersToCancel. Currently it says:

    This setting controls how long the queue waits after issuing a cancel. After this time has expired, the queue will:
    
    - Abort the worker threads
    
    Or
    
    - Wait until all threads have died.
    

    Replace with:

    This setting controls how long the queue waits after issuing a cancel request. After this time has expired, the queue will wait until all worker threads have completed.
    

    (The AbortWorkerThreadsWhenStopping property no longer exists -- there is no abort option. The queue always waits.)

  2. Verify the four properties match source. The page must document exactly these four IWorkerConfiguration properties and no others:

    • WorkerCount (int)
    • TimeToWaitForWorkersToCancel (TimeSpan)
    • TimeToWaitForWorkersToStop (TimeSpan)
    • SingleWorkerWhenNoWorkFound (bool)
  3. No MinimumThreads, MaxQueueSize, or ThreadIdleTimeout -- those belong to ITaskSchedulerConfiguration, not IWorkerConfiguration. Verify the page does not confuse them.

grep -c "AbortWorkerThreadsWhenStopping\|Abort the worker threads" /mnt/f/git/dotnetworkqueue.wiki/WorkerConfiguration.md; echo "---"; grep -c "WorkerCount\|TimeToWaitForWorkersToCancel\|TimeToWaitForWorkersToStop\|SingleWorkerWhenNoWorkFound" /mnt/f/git/dotnetworkqueue.wiki/WorkerConfiguration.md First grep returns 0 (no abort references). Second grep returns 4 (all four properties documented).

Task 2: Fix TaskSchedulerConfiguration.md and ConsumerAsyncWorkGroup.md

**A) TaskSchedulerConfiguration.md:**
  1. Verify typo is already fixed. Check that the code sample on line 43 uses WaitForThreadPoolToFinish (double 't' in Thread) not WaitForTheadPoolToFinish (single 't'). The current page appears correct (line 43 shows WaitForThreadPoolToFinish), but verify.

  2. Remove MinimumThreads, MaxQueueSize, and ThreadIdleTimeout sections. These properties do NOT exist on ITaskSchedulerConfiguration in the 0.9.30 source. The interface has exactly two properties:

    • MaximumThreads (int)
    • WaitForThreadPoolToFinish (TimeSpan)

    Remove the following sections entirely:

    • "Minimum threads" section (lines 13-19)
    • "Max Queue Size" section (lines 21-27)
    • "Thread idle timeout" section (lines 29-35)

    These may have existed in an older version but are not in the current ITaskSchedulerConfiguration.cs.

  3. Verify configuration access path. The code samples should use taskScheduler.Configuration.MaximumThreads or factory.Scheduler.Configuration.MaximumThreads (both are valid depending on context).

B) ConsumerAsyncWorkGroup.md:

  1. Fix AddWorkGroup call on line 10. Currently:

    var group = taskScheduler.AddWorkGroup("workGroupName", 1, 1);

    Change to:

    var group = taskScheduler.AddWorkGroup("workGroupName", 1);

    The method takes exactly 2 parameters: name (string) and concurrencyLevel (int). There is no third parameter.

  2. Update the description on line 12. Currently: The above example creates a workgroup with a max concurrency level of 1 and a max queue size of 1. Note that the queue size param will not increase the scheduler queue size. If you specify a vaule and the scheduler has a max of 0, no in memory queue will be used. Change to: The above example creates a work group with a max concurrency level of 1. This prevents any single queue from consuming more than 1 thread in the scheduler. (Remove the queue size discussion since that parameter does not exist. Fix "vaule" typo.)

  3. Fix typo on line 6: "taks" should be "tasks".

  4. Update cross-reference: The title or intro should reference ConsumerMethodAsync instead of generic async consumer, since work groups are used with CreateConsumerMethodQueueScheduler or CreateConsumerQueueScheduler.

grep -c "WaitForTheadPoolToFinish" /mnt/f/git/dotnetworkqueue.wiki/TaskSchedulerConfiguration.md; echo "---"; grep -c "AddWorkGroup.*,.*,.*)" /mnt/f/git/dotnetworkqueue.wiki/ConsumerAsyncWorkGroup.md; echo "---"; grep "MinimumThreads\|MaxQueueSize\|ThreadIdleTimeout" /mnt/f/git/dotnetworkqueue.wiki/TaskSchedulerConfiguration.md; echo "exit: $?" First grep returns 0 (typo gone). Second grep returns 0 (no three-param AddWorkGroup). Third grep returns no matches (exit code 1) -- removed properties are gone. Only `MaximumThreads` and `WaitForThreadPoolToFinish` remain in TaskSchedulerConfiguration.md.

Task 3: Expand configuration pages -- ProducerConfiguration.md, ConsumerConfiguration.md, ConsumerAsyncConfiguration.md

**A) ProducerConfiguration.md** -- expand from stub. Currently the page only lists Time Configuration and Transport Configuration. Replace content with:
#### Producer Configuration

All configuration settings should be set before sending the first message.

* [Time Configuration](https://github.com/blehnen/DotNetWorkQueue/wiki/TimeConfiguration)
* [Transport Configuration](https://github.com/blehnen/DotNetWorkQueue/wiki/TransportConfiguration) -- includes retry delay behavior (`RetryDelayBehavior`) for mapping exception types to retry delay sequences
* Policies -- Polly-based resilience policies for send operations
* Header Names -- well-known header name constants

Most producer options (delayed processing, message expiration, history tracking) are set at **queue creation time** via `QueueCreationContainer`, not on the producer runtime configuration. See your transport's Queue Creation Options page for those settings.

B) ConsumerConfiguration.md -- verify MessageError entry is present. The current page (from prior update) already includes a "Message Error Configuration" bullet. Verify it is present and accurately describes Enabled (default true), MessageAge (default 30 days), and MonitorTime (default daily). If already correct, no changes needed.

Additionally verify that the MessageHistory entry clarifies that history is enabled at queue creation time, not at consumer runtime:

  • If [Message History] link is present, add a note: "Message history is enabled at queue creation time (EnableHistory = true), not at consumer runtime. This link documents the history feature."

C) ConsumerAsyncConfiguration.md -- verify MessageError entry is present. The current page already includes it. Verify it matches ConsumerConfiguration.md. Also verify:

  • Task Scheduler Configuration link is present (it is, line 10)
  • MessageHistory entry has the same queue-creation-time clarification as ConsumerConfiguration.md
grep -c "MessageError\|Message Error" /mnt/f/git/dotnetworkqueue.wiki/ConsumerConfiguration.md; echo "---"; grep -c "MessageError\|Message Error" /mnt/f/git/dotnetworkqueue.wiki/ConsumerAsyncConfiguration.md; echo "---"; grep -c "queue creation\|QueueCreationContainer\|Policies\|RetryDelayBehavior" /mnt/f/git/dotnetworkqueue.wiki/ProducerConfiguration.md First grep returns >= 1 (MessageError documented in ConsumerConfiguration.md). Second grep returns >= 1 (MessageError documented in ConsumerAsyncConfiguration.md). Third grep returns >= 1 (ProducerConfiguration.md expanded with transport config details and queue creation note).

Clone this wiki locally