Skip to content

Conversation

Arkatufus
Copy link
Contributor

Fixes #7713

Changes

Add clean shutdown code to ShardingConsumerControlerImpl

Copy link
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
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
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
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