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

Is it possible to publish a message on a topic only for specific peers? #532

Open
iowar opened this issue Jun 4, 2023 · 2 comments
Open

Comments

@iowar
Copy link

iowar commented Jun 4, 2023

I wonder if this is possible, and if not, what alternative filters can be applied?

@Stebalien
Copy link
Member

Not really. If you want to send messages directly from one peer to another, I'd recommend opening a new stream to that peer and sending it directly. Pubsub is a broadcast protocol; it tries to maintain a well connected graph for distributing messages, but there isn't even a guarantee that you'll be connected to any specific peer.

@iowar
Copy link
Author

iowar commented Jun 6, 2023

Thank you for the quick response I get it. I have another question. Is it possible to use this part as an authentication mechanism with the ConnectionGater structure? At this stage, the system hasn't established a complete connection yet, and it seems that we cannot create a stream. Apart from the public key verification, it doesn't seem like much else can be done.It would be great to have something that enables one-way data transmission at this stage.Perhaps I shouldn't have asked this question in the pubsub repository, I'm not sure.

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

2 participants