How to find out all signed filters on a PUB server?

I have a server . How can it determine which filters are subscribed to, so the server knows what data it should create? The server does not need to create data if there are no clients interested. PUB

SUB

Say that the set of possible filters is huge (or endless), but subscribers at any given time simply subscribe to several of them.

Example . It is said that customers only subscribe to weather data for several area codes in New York and Paris. Then the server does not need to create meteorological data for any other area code in any other city in the world, just to throw everything away again. SUB PUB

How to find out all filter subscribers on the server ? PUB

If there is no easy way, how can I solve it differently?

+4
source share
1 answer

I will answer my question here if it will be used by someone else.

Requirements in which:

  • The client should be able to ask the server which identifiers (topics) are available for subscription.

  • The client must select the identifier of interest to him and inform the server about it.

  • The server must create data for all signed too id and send this data to clients.

  • The client and server should not lock / hang if one of them leaves.

Implementation:

Step 1. This is two-way traffic and is performed using REQ / REP sockets.

Step 2. One traffic path from one client to one server and is performed by PUSH / PULL sockets.

3. PUB/SUB.

4. , . " " , -, , . ( , ..).

4+. , , . , ( ). , . , , ( ). .

. . , zeromq /, .

0

Source: https://habr.com/ru/post/1622161/


All Articles