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

Publisher side filtering #1473

Open
uriwangsz opened this issue Jul 19, 2021 · 8 comments
Open

Publisher side filtering #1473

uriwangsz opened this issue Jul 19, 2021 · 8 comments

Comments

@uriwangsz
Copy link

uriwangsz commented Jul 19, 2021

Is your feature request related to a problem? Please describe.

My case like the follow picture:

image

problem:

  1. Even if I set the topic, each subscriber will receive all data publisher pushed in the net.
  2. If the data flow is sufficient, the subscriber cannot increase the processing capacity through horizontal scaling.

Describe the solution you'd like
Is it possible to provide the ability to set a topic against the subscribe on the Publisher side?

Describe alternatives you've considered

Additional context

@gdamore
Copy link
Contributor

gdamore commented Jul 19, 2021

What you want is publisher side filtering. This is not possible with the current protocol. I do have plans for a new protocol that would be able to do this but I cannot estimate when it will arrive in the code as I'm working on a bunch of other priorities first - and NNG is not a full time effort for me.

@uriwangsz
Copy link
Author

thanks

@mitchellwrosen
Copy link

Sounds like a great improvement! Is there another open issue about publisher-side filtering that I could track?

@uriwangsz uriwangsz reopened this Jul 20, 2021
@uriwangsz
Copy link
Author

I reopen it @mitchellwrosen ,maybe usable

@janjaapbos
Copy link
Contributor

janjaapbos commented Dec 29, 2021

My suggestion would be not to add this as an extension to the protocol, but just to have the publisher application add an additional pub/sub that only republishes filtered message using any filter / logic wished for. The remote end can than subscribe to the filtered publisher.

With aio it is very lightweight to add the filtered publisher and you get all the flexibility for filtering including a dedicated queue for the filtered topic.

For each specific filter you would get a dedicated second publisher + queue.

So my view is that this is best solved in the application and not in NNG it self.

@gdamore
Copy link
Contributor

gdamore commented Dec 30, 2021

That approach is a reasonable workaround, but as it requires creating new endpoints, it isn't very conducive to easy administration at scale. I consider the request still outstanding for now.

@gdamore gdamore changed the title Is it possible to provide the ability to set a topic against the subscribe on the Publisher side? Publisher side filtering Dec 30, 2021
@JaylinYu
Copy link
Contributor

Just curious, Isn't this an MQTT thing?

@gdamore
Copy link
Contributor

gdamore commented Dec 30, 2021

MQTT does this of course via a broker. But it is useful even in brokerless configurations.

Brokerless doesn't give you reliability - but it would support better scalability and could be extended into a hypothetical multicast transport.

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

5 participants