Inbound Commands
Inbound commands are messages sent from the CritterWatch server to monitored services. All commands implement IServiceMessage and are routed directly to the target service's Wolverine queue.
All commands are automatically handled when AddCritterWatchMonitoring() is called — no additional handler registration is needed.
Command Reference
Dead Letter Queue Commands
ReplayMessages
Replay dead-lettered messages back through the processing pipeline.
public record ReplayMessages(
string ServiceName,
string? MessageType, // null = all message types
string? TenantId, // null = default tenant
int? MaxCount // null = all matching messages
);// Replay all dead-lettered messages of a specific type
await bus.SendAsync(new ReplayMessages(
ServiceName: "trip-service",
MessageType: "TripService.Messages.BookTrip"
));DiscardMessages
Permanently remove dead-lettered messages from the queue.
public record DiscardMessages(
string ServiceName,
string? MessageType,
string? TenantId,
int? MaxCount
);// Permanently discard dead-lettered messages
await bus.SendAsync(new DiscardMessages(
ServiceName: "trip-service",
MessageType: null // null = all message types
));EditScheduledMessage
Modify a scheduled message before it fires.
public record EditScheduledMessage(
string ServiceName,
Guid EnvelopeId,
string? UpdatedBody,
DateTimeOffset? NewExecutionTime,
string? TenantId
);Endpoint Commands
PauseListener
Stop processing messages on a specific endpoint.
public record PauseListener(string ServiceName, string EndpointName);RestartListener
Resume a paused listener.
public record RestartListener(string ServiceName, string EndpointName);PauseAllListeners
Pause all listeners for a service (useful before maintenance).
public record PauseAllListeners(string ServiceName);RestartAllListeners
Resume all listeners for a service.
public record RestartAllListeners(string ServiceName);UpdateEndpointBufferingLimits
Change the in-memory buffering configuration of an endpoint at runtime.
public record UpdateEndpointBufferingLimits(
string ServiceName,
string EndpointName,
int? MaximumMessagesToReceive,
int? MaximumMessageWaitInQueue,
int? BatchSize
);UpdateEndpointCircuitBreaker
Change the circuit breaker configuration of an endpoint at runtime.
public record UpdateEndpointCircuitBreaker(
string ServiceName,
string EndpointName,
double? FailurePercentageThreshold,
TimeSpan? SamplingPeriod,
TimeSpan? PauseTime,
int? SuccessCountBeforeReopening
);Projection Commands
PauseProjection
Stop an async projection shard.
public record PauseProjection(string ServiceName, string ShardName);RestartProjection
Resume a paused projection shard.
public record RestartProjection(string ServiceName, string ShardName);RebuildProjection
Reset a projection and rebuild from the beginning of the event stream.
public record RebuildProjection(string ServiceName, string ShardName);RewindSubscription
Move a projection's position marker back to a previous point.
public record RewindSubscription(
string ServiceName,
string ShardName,
long? SequenceFloor, // specific sequence, or 0 for beginning
DateTimeOffset? TimestampFloor, // rewind to nearest sequence for timestamp
string? TenantId
);Node Commands
EjectNode
Remove a stale node from the cluster.
public record EjectNode(string ServiceName, Guid NodeId);TriggerElection
Force a new leader election.
public record TriggerElection(string ServiceName);ClearNodeHistory
Remove historical node records.
public record ClearNodeHistory(string ServiceName);Chaos Monkey Commands
EnableChaosMonkey / DisableChaosMonkey
Arm or disarm the chaos monkey on a service.
SetChaosFailureRate
Set the handler failure rate (0.0–1.0).
SetChaosSlowHandlerRate
Set the slow handler rate and delay duration.
SetChaosProjectionFailureRate
Set the projection processing failure rate.
See Chaos Monkey for full documentation.
Tenant Commands
AddTenant / RemoveTenant / EnableTenant / DisableTenant
Manage tenant databases at runtime.
RequestTenantList
Ask the service to publish its current tenant list.
See Multi-Tenancy for full documentation.
Data Request Commands
RequestAgentHealthReport
Ask the service to immediately report agent health (bypassing the 60-second timer).
public record RequestAgentHealthReport(string ServiceName);RequestHandlerSourceCode
Ask the service to send the generated source code for a specific handler.
public record RequestHandlerSourceCode(
string ServiceName,
string MessageTypeName
);PushAgentThresholds
Send updated alert thresholds to the service for client-side validation.
public record PushAgentThresholds(
string ServiceName,
AgentThresholds Thresholds
);