Skip to content

Subscribe to partial messages #444

@lucassaldanha

Description

@lucassaldanha

Implements the per-topic partial-capability flag plumbing (Step 1 of #435).

Scope

  • Outbound announce: include SubOpts.requestsPartial and SubOpts.supportsSendingPartial in subscribe announcements for topics where the client has opted in (via subscribe API topic options).
  • Inbound parse: update a PartialTopicState: Map<Topic, Map<PeerId, PartialSubFlags>> structure from every inbound SubOpts with subscribe=true.
  • Coercion on receive (matches go-libp2p): supportsSendingPartial := requestsPartial || supportsSendingPartial.
  • MUST ignore both flags when subscribe=false (unsubscribe announcement).
  • Cleanup on peer disconnect and on local unsubscribe.

Reference

Design: docs/partial-messages.md §6.1 (lands with the first PR on #435).
go-libp2p: pubsub.go:1245-1324 (announce), :1419-1423 (parse with coercion).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions