Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Handling for GROUP_DROPPED Messages #3

Open
4 tasks
OkutaniDaichi0106 opened this issue Dec 1, 2024 · 1 comment
Open
4 tasks

Implement Handling for GROUP_DROPPED Messages #3

OkutaniDaichi0106 opened this issue Dec 1, 2024 · 1 comment

Comments

@OkutaniDaichi0106
Copy link
Owner

Implement Handling for GROUP_DROPPED Messages

Description

Implement logic to handle GROUP_DROPPED messages in the subscription process. This feature will ensure that the system properly manages cases where a Group Stream is reset or cannot be fully delivered.

Background

The protocol specifies that:

  1. The publisher MUST send a GROUP_DROPPED message if a Group Stream is reset.
  2. The subscriber SHOULD properly handle GROUP_DROPPED messages to maintain consistency and determine when a subscription can be closed.

Handling these messages is crucial to:

  • Inform the subscriber of incomplete Group Streams.
  • Allow the subscriber to close subscriptions cleanly.
  • Ensure data integrity in scenarios involving dropped or reset streams.

Acceptance Criteria

  • Publisher sends GROUP_DROPPED messages whenever a Group Stream is reset.
  • Subscriber identifies and processes GROUP_DROPPED messages correctly.
  • Tests to verify that GROUP_DROPPED messages trigger appropriate behaviors (e.g., logging, cleanup, retries).
  • Documentation updated to reflect how GROUP_DROPPED messages are handled.

Tasks

  1. Publisher Implementation:

    • Add logic to detect Group Stream resets and send GROUP_DROPPED messages.
    • Ensure compliance with protocol requirements (e.g., MUST/MAY rules).
  2. Subscriber Implementation:

    • Add handling for GROUP_DROPPED messages.
    • Implement optional behaviors (e.g., retries, state updates, or ignoring non-critical groups).
  3. Testing:

    • Create unit and integration tests to cover scenarios where GROUP_DROPPED messages are used.
    • Validate that subscriptions are closed correctly when all messages are received.
  4. Documentation:

    • Update protocol handling guides with examples of GROUP_DROPPED usage.
    • Add developer notes about edge cases (e.g., frequent resets, long-running streams).

Additional Notes

  • Ensure backward compatibility with existing implementations.
  • Consider performance implications of additional message handling in high-load scenarios.

References

Priority

High

@OkutaniDaichi0106
Copy link
Owner Author

I have already implemented the GROUP_DROPPED message with Encode and Decode methods in the internal/message/group_drop.go file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant