@@ -362,6 +362,8 @@ impl ConfigState {
362362 /// let yaml = r#"
363363 /// supervisor:
364364 /// strategy: OneForAll
365+ /// control_channel_capacity: 256
366+ /// event_channel_capacity: 256
365367 /// policy:
366368 /// child_restart_limit: 10
367369 /// child_restart_window_ms: 60000
@@ -433,8 +435,8 @@ impl ConfigState {
433435 spec. config_version = self . config_version ( ) ;
434436 spec. supervisor_failure_limit = self . policy . supervisor_failure_limit ;
435437 spec. escalation_policy = self . supervisor . escalation_policy ;
436- spec. control_channel_capacity = self . observability . event_journal_capacity ;
437- spec. event_channel_capacity = self . observability . event_journal_capacity ;
438+ spec. control_channel_capacity = self . supervisor . control_channel_capacity ;
439+ spec. event_channel_capacity = self . supervisor . event_channel_capacity ;
438440 spec. backpressure_config = self . backpressure . clone ( ) ;
439441 let group_members = derive_group_members ( & self . children ) ;
440442 spec. group_configs = self
@@ -508,8 +510,10 @@ impl ConfigState {
508510 /// Returns a deterministic version string for diagnostics.
509511 fn config_version ( & self ) -> String {
510512 format ! (
511- "supervisor-{:?}-policy-{}-{}-shutdown-{}-observe-{}-backpressure-{:?}-{}-{}" ,
513+ "supervisor-{:?}-channels-{}-{}- policy-{}-{}-shutdown-{}-observe-{}-backpressure-{:?}-{}-{}" ,
512514 self . supervisor. strategy,
515+ self . supervisor. control_channel_capacity,
516+ self . supervisor. event_channel_capacity,
513517 self . policy. child_restart_limit,
514518 self . policy. supervisor_failure_limit,
515519 self . shutdown. graceful_timeout_ms,
@@ -662,6 +666,14 @@ fn validate_lower_policy(
662666fn validate_supervisor_root (
663667 supervisor : & SupervisorRootConfig ,
664668) -> Result < ( ) , crate :: error:: types:: SupervisorError > {
669+ validate_positive (
670+ supervisor. control_channel_capacity as u64 ,
671+ "supervisor.control_channel_capacity" ,
672+ ) ?;
673+ validate_positive (
674+ supervisor. event_channel_capacity as u64 ,
675+ "supervisor.event_channel_capacity" ,
676+ ) ?;
665677 if supervisor. dynamic_supervisor . child_limit == Some ( 0 ) {
666678 return Err ( crate :: error:: types:: SupervisorError :: fatal_config (
667679 "supervisor.dynamic_supervisor.child_limit must be greater than zero" ,
0 commit comments