From ae521951d155a57788ca1b6cc87d479ef24e0431 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:22:54 +0000 Subject: [PATCH] Fix 6 tutorials with code snippets mismatched against actual source code Agent-Logs-Url: https://github.com/devstress/My3DLearning/sessions/d83b5f9e-d983-4b9c-874c-6ac2882c4f4e Co-authored-by: devstress <30769729+devstress@users.noreply.github.com> --- .../tutorials/08-activities-pipeline.md | 17 +++++++++++------ .../tutorials/26-message-replay.md | 4 ++-- .../tutorials/29-throttle-rate-limiting.md | 2 +- .../tutorials/31-event-sourcing.md | 12 ++++++------ .../tutorials/43-kubernetes-deployment.md | 15 +++++++++++---- .../tutorials/49-testing-integrations.md | 13 +++++++++++-- 6 files changed, 42 insertions(+), 21 deletions(-) diff --git a/EnterpriseIntegrationPlatform/tutorials/08-activities-pipeline.md b/EnterpriseIntegrationPlatform/tutorials/08-activities-pipeline.md index 64404b0..6755cec 100644 --- a/EnterpriseIntegrationPlatform/tutorials/08-activities-pipeline.md +++ b/EnterpriseIntegrationPlatform/tutorials/08-activities-pipeline.md @@ -165,8 +165,8 @@ public class IntegrationPipelineWorker : BackgroundService { protected override async Task ExecuteAsync(CancellationToken ct) { - await _consumer.SubscribeAsync( - topic: _options.InputTopic, + await _consumer.SubscribeAsync( + topic: _options.InboundSubject, consumerGroup: _options.ConsumerGroup, handler: async envelope => { @@ -251,10 +251,15 @@ The pipeline is configured via `PipelineOptions`: ```csharp public class PipelineOptions { - public string InputTopic { get; set; } // Where to listen - public string ConsumerGroup { get; set; } // Consumer group name - public int WorkerConcurrency { get; set; } // Parallel processing - public TimeSpan ProcessingTimeout { get; set; } // Per-message timeout + public string NatsUrl { get; set; } // NATS server URL + public string InboundSubject { get; set; } // Where to listen + public string AckSubject { get; set; } // Ack notification subject + public string NackSubject { get; set; } // Nack notification subject + public string ConsumerGroup { get; set; } // Consumer group name + public string TemporalServerAddress { get; set; } // Temporal gRPC address + public string TemporalNamespace { get; set; } // Temporal namespace + public string TemporalTaskQueue { get; set; } // Temporal task queue + public TimeSpan WorkflowTimeout { get; set; } // Workflow timeout } ``` diff --git a/EnterpriseIntegrationPlatform/tutorials/26-message-replay.md b/EnterpriseIntegrationPlatform/tutorials/26-message-replay.md index 1f29df2..8550042 100644 --- a/EnterpriseIntegrationPlatform/tutorials/26-message-replay.md +++ b/EnterpriseIntegrationPlatform/tutorials/26-message-replay.md @@ -53,8 +53,8 @@ public interface IMessageReplayer // src/Processing.Replay/IMessageReplayStore.cs public interface IMessageReplayStore { - Task StoreForReplayAsync(IntegrationEnvelope envelope, string topic, CancellationToken ct = default); - IAsyncEnumerable> GetMessagesForReplayAsync(string topic, ReplayFilter filter, int maxMessages, CancellationToken ct = default); + Task StoreForReplayAsync(IntegrationEnvelope envelope, string topic, CancellationToken ct); + IAsyncEnumerable> GetMessagesForReplayAsync(string topic, ReplayFilter filter, int maxMessages, CancellationToken ct); } ``` diff --git a/EnterpriseIntegrationPlatform/tutorials/29-throttle-rate-limiting.md b/EnterpriseIntegrationPlatform/tutorials/29-throttle-rate-limiting.md index 5aa89ce..5e45b88 100644 --- a/EnterpriseIntegrationPlatform/tutorials/29-throttle-rate-limiting.md +++ b/EnterpriseIntegrationPlatform/tutorials/29-throttle-rate-limiting.md @@ -5,7 +5,7 @@ - How `IMessageThrottle` controls message flow rate inside the pipeline - The `TokenBucketThrottle` algorithm: steady refill rate with burst capacity - `IThrottleRegistry` for managing multiple throttle policies per partition key -- `ThrottlePolicy` with partition strategies: by Source, Recipient, CorrelationId, or Global +- `ThrottlePolicy` with partition strategies: by TenantId, Queue, Endpoint, or Global - `ThrottleMetrics` for monitoring throttle pressure and wait times - The difference between **rate limiting** (HTTP 429) and **throttling** (pipeline delays) - Per-tenant partitioning for fair resource sharing diff --git a/EnterpriseIntegrationPlatform/tutorials/31-event-sourcing.md b/EnterpriseIntegrationPlatform/tutorials/31-event-sourcing.md index b92ea65..63fd101 100644 --- a/EnterpriseIntegrationPlatform/tutorials/31-event-sourcing.md +++ b/EnterpriseIntegrationPlatform/tutorials/31-event-sourcing.md @@ -48,19 +48,19 @@ public interface IEventStore string streamId, IReadOnlyList events, long expectedVersion, - CancellationToken ct = default); + CancellationToken cancellationToken = default); Task> ReadStreamAsync( string streamId, long fromVersion, int count, - CancellationToken ct = default); + CancellationToken cancellationToken = default); Task> ReadStreamBackwardAsync( string streamId, long fromVersion, int count, - CancellationToken ct = default); + CancellationToken cancellationToken = default); } ``` @@ -107,7 +107,7 @@ public static class TemporalQuery DateTimeOffset pointInTime, TState initialState, int maxEventsPerRead = 1000, - CancellationToken ct = default) where TState : notnull; + CancellationToken cancellationToken = default) where TState : notnull; } ``` @@ -117,8 +117,8 @@ public static class TemporalQuery // src/EventSourcing/ISnapshotStore.cs public interface ISnapshotStore { - Task SaveAsync(string streamId, TState state, long version, CancellationToken ct = default); - Task<(TState? State, long Version)> LoadAsync(string streamId, CancellationToken ct = default); + Task SaveAsync(string streamId, TState state, long version, CancellationToken cancellationToken = default); + Task<(TState? State, long Version)> LoadAsync(string streamId, CancellationToken cancellationToken = default); } ``` diff --git a/EnterpriseIntegrationPlatform/tutorials/43-kubernetes-deployment.md b/EnterpriseIntegrationPlatform/tutorials/43-kubernetes-deployment.md index 3c9fcc6..19a420c 100644 --- a/EnterpriseIntegrationPlatform/tutorials/43-kubernetes-deployment.md +++ b/EnterpriseIntegrationPlatform/tutorials/43-kubernetes-deployment.md @@ -37,11 +37,18 @@ deploy/helm/eip/ ├── Chart.yaml # Chart metadata and version ├── values.yaml # Default configuration values └── templates/ - ├── deployment.yaml - ├── service.yaml - ├── ingress.yaml + ├── _helpers.tpl + ├── admin-api.yaml + ├── configmap.yaml + ├── demo-pipeline.yaml + ├── grafana-dashboards-configmap.yaml ├── hpa.yaml - └── configmap.yaml + ├── ingestion-kafka.yaml + ├── namespace.yaml + ├── networkpolicy.yaml + ├── openclaw-web.yaml + ├── serviceaccount.yaml + └── workflow-temporal.yaml ``` **Chart.yaml** declares the chart: diff --git a/EnterpriseIntegrationPlatform/tutorials/49-testing-integrations.md b/EnterpriseIntegrationPlatform/tutorials/49-testing-integrations.md index 1033ac6..b6cce9f 100644 --- a/EnterpriseIntegrationPlatform/tutorials/49-testing-integrations.md +++ b/EnterpriseIntegrationPlatform/tutorials/49-testing-integrations.md @@ -137,17 +137,26 @@ Test Temporal workflows without infrastructure: [TestFixture] public class IntegrationPipelineWorkflowTests { - private ITestWorkflowEnvironment _env; + private WorkflowEnvironment? _env; [SetUp] public async Task SetUp() { - _env = await TestWorkflowEnvironment.StartLocalAsync(); + try + { + _env = await WorkflowEnvironment.StartLocalAsync(); + } + catch (Exception) + { + // Temporal local dev server not available + } } [Test] public async Task Pipeline_CompletesAllSteps() { + if (_env == null) return; + var worker = _env.Client.CreateWorker(/*...*/); var result = await _env.Client.ExecuteWorkflowAsync( (IntegrationPipelineWorkflow wf) => wf.RunAsync(testInput));