libp2p / libp2p/go-libp2p-pubsub

Have a configuration option for Subscriptions receiving duplicate messages

Open
#216 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
364
Forks
221
PR merge metrics
No merged PRs in 30d

Description

Assuming #215 is implemented there may be reasons why subscribers will want to see all the peers that sent them messages, not just the first peer to send them a given message.

The simplest way to do this seems to be just having a SubOpt that allows us to send messages even if we've seen them

https://github.com/libp2p/go-libp2p-pubsub/blob/2247a54a8cfc7f84d54d28429a60fa4ce89d5c43/pubsub.go#L676

Unfortunately, this the logic for ignoring duplicates exists in the pubsub logic instead of the subscription logic so this means some code will have to get moved around.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the duplicate-handling logic in pubsub.go at the linked location, then trace how SubOpt and subscriptions receive messages. Determine how the option can preserve duplicate deliveries from all peers without changing the default behavior. Done means subscribers can opt into duplicate messages while other subscribers continue to receive only the first one.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.