]> git.corax.cc Git - toolbox/commit
include/ipc: Use the endpoint name as name for pubsub subscriptions
authorMatthias Kruk <m@m10k.eu>
Wed, 1 Dec 2021 09:40:28 +0000 (18:40 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 1 Dec 2021 09:40:28 +0000 (18:40 +0900)
commit4c2d817f9568881b9f53acdab909c328646e6097
tree45b816f0dc08f10e09bf2f5f38e173a9ec6f82a1
parent263b60f1a7ff4bfab9557bd35df88115c220408a
include/ipc: Use the endpoint name as name for pubsub subscriptions

When subscribing to a pubsub channel, a name constructed from the
hostname and pid is used for the subscription name. When multiple
processes subscribe to the same topic using the same endpoint, this
causes the endpoint to be subscribed multiple times, and multiple
messages to be received by the endpoint, when it should only receive
one message (this usage is intended for load-balancing over pubsub
channels).
This commit modifies the ipc module so that the name of the endpoint
is used for the subscription name, preventing an endpoint from being
subscribed multiple times to the same topic.
include/ipc.sh