[Core][Frontend] Bind KV-event publishers at port 0 and expose the bound endpoints (#55844)

Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: mukeshbhandarkar <shell00035@gmail.com>
Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: aoshen02 <aoshen@inferact.ai>
This commit is contained in:
hangangqiang
2026-09-18 18:11:05 -07:00
committed by GitHub
co-authored by mukeshbhandarkar aoshen02 Claude Fable 5.1 aoshen02
parent 729ebac498
commit 90531daf6d
11 changed files with 282 additions and 14 deletions
+4
View File
@@ -91,8 +91,11 @@ class MockSubscriber:
if isinstance(replay_endpoints, str):
replay_endpoints = [replay_endpoints]
ipv6 = any("[" in ep for ep in pub_endpoints + (replay_endpoints or []))
# Set up subscriber socket - connect to all endpoints
self.sub = self.ctx.socket(zmq.SUB)
self.sub.setsockopt(zmq.IPV6, ipv6)
self.sub.setsockopt(zmq.SUBSCRIBE, topic.encode("utf-8"))
for endpoint in pub_endpoints:
self.sub.connect(endpoint)
@@ -103,6 +106,7 @@ class MockSubscriber:
if replay_endpoints:
for replay_endpoint in replay_endpoints:
replay = self.ctx.socket(zmq.DEALER)
replay.setsockopt(zmq.IPV6, ipv6)
replay.connect(replay_endpoint)
self.replay_sockets.append(replay)