Fix to allow reuse of group names when using Redis/NATS as backplane#21
Merged
Fix to allow reuse of group names when using Redis/NATS as backplane#21
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue that prevented reusing group names with Redis and NATS backplanes by ensuring that disposed groups are properly removed from the internal dictionaries. Key changes include:
- Adding tests (for in-memory, Redis, and NATS) to verify that groups can be recreated after disposal.
- Updating the provider classes to pass a removal callback to group implementations.
- Modifying group classes (RedisGroup and NatsGroup) to invoke a disposal callback to remove disposed groups.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Multicaster.Tests/InMemoryGroupTest.cs | Added a test to verify group reuse after disposal in the in-memory provider. |
| test/Multicaster.Distributed.Redis.Tests/RedisGroupTest.cs | Updated tests to use the helper CreateJsonSerializedInvocation for assertions. |
| test/Multicaster.Distributed.Nats.Tests/NatsGroupTest.cs | Added a test to verify group reuse after disposal with the NATS provider. |
| src/Multicaster.Distributed.Redis/RedisGroupProvider.cs | Updated group creation methods to pass a removal callback that cleans up disposed groups. |
| src/Multicaster.Distributed.Redis/RedisGroup.cs | Modified Dispose to call the removal callback for group cleanup. |
| src/Multicaster.Distributed.Nats/NatsGroupProvider.cs | Updated group creation methods to pass a removal callback to NatsGroup. |
| src/Multicaster.Distributed.Nats/NatsGroup.cs | Modified Dispose to call the removal callback for group cleanup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.