Polling Inside a Subscription

Is it fine if they are both using the same port?

Yes, devices open transient inbound ports when establishing connections to other systems.

The redis server, on the other hand, only listens for incoming connections on 1 port.

It’s the redis server’s job to be able to identify which connection is which, but specifying a connection ID or the like on the client can make things easier to know which client is doing what.

The problem now is that dynamic subscriptions seem to publish to other subscriptions.

Please describe what your expected behavior is and what the actual behavior is.

If you subscribe to topic A and then publish to topic A, it’s 100% expected to receive an event from topic A on your subscriber.

Most of the time, a publisher and subscriber are expected to be different devices, because in most systems there is no reason to generate an event and consume it in the same place.

1 Like