Skip to content

Fix unclean ShardingConsumerControllerImpl shutdown#7714

Merged
Aaronontheweb merged 5 commits into
akkadotnet:devfrom
Arkatufus:#7713-Fix-Sharding.Delivery-unclean-shutdown
Jun 20, 2025
Merged

Fix unclean ShardingConsumerControllerImpl shutdown#7714
Aaronontheweb merged 5 commits into
akkadotnet:devfrom
Arkatufus:#7713-Fix-Sharding.Delivery-unclean-shutdown

Conversation

@Arkatufus
Copy link
Copy Markdown
Contributor

Fixes #7713

Changes

Add clean shutdown code to ShardingConsumerControlerImpl

Copy link
Copy Markdown
Contributor Author

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review

Comment on lines +128 to +136
if (ProducerControllers.Count == 0 && ConsumerControllers.Count == 0)
{
_log.Debug("ShardingConsumerController terminated.");
Context.Stop(Self);
}
else
{
Become(ShuttingDown());
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a "shutting down" state to the actor, attempt cleanup before performing Context.Stop(Self)

Copy link
Copy Markdown
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit b49b47b into akkadotnet:dev Jun 20, 2025
11 checks passed
This was referenced May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sharding.Delivery] Stopped consumer causes ShardingConsumerControllerImpl to shutdown uncleanly

2 participants