Skip to content

vllm.distributed.ec_transfer.ec_connector.cpu.control.zmq

ZMQ control-plane implementations for ECCPUConnector.

ZmqClientConnection — one DEALER socket to a single producer peer. ZmqClientTransport — pool of ZmqClientConnection objects (consumer side). ZmqServerTransport — ROUTER socket (producer side).

Classes:

ZmqClientConnection dataclass

Bases: ControlConnection

One DEALER socket to one producer peer.

Owns the socket and its optional monitor socket. NIXL state is NOT stored here — it belongs in ECSession above this layer.

ZmqClientTransport

Pool of ZmqClientConnection objects — one per producer peer.

Creates DEALER sockets lazily on first contact. Does not touch NIXL; NIXL registration is handled by ECCPUConsumer once an XferAck arrives.

Methods:

  • connect –

    Return the existing connection for addr, or create a new one.

  • poll –

    Non-blocking drain of messages from every peer's DEALER.

  • poll_dead –

    Non-blocking sweep of peer monitors; return addresses that died.

  • remove –

    Remove and close the connection for addr, returning it (or None).

connect(addr)

Return the existing connection for addr, or create a new one.

poll()

Non-blocking drain of messages from every peer's DEALER.

poll_dead()

Non-blocking sweep of peer monitors; return addresses that died.

remove(addr)

Remove and close the connection for addr, returning it (or None).

ZmqServerTransport

ROUTER socket for the producer side. Byte-level only, driven by ProducerSession.

poll(timeout_ms) waits up to timeout_ms for messages, then drains all that are available; timeout_ms=0 drains whatever has already arrived. send() routes a reply back to a specific peer by ZMQ identity.

Methods:

  • poll –

    Wait up to timeout_ms for incoming messages, then drain all pending.

  • send –

    Send a reply payload to the peer identified by ZMQ identity.

Attributes:

  • port (int) –

    Return the actual bound port, including when port 0 was requested.

port property

Return the actual bound port, including when port 0 was requested.

poll(timeout_ms=0)

Wait up to timeout_ms for incoming messages, then drain all pending.

Returns a list of (identity, payload) pairs.

send(identity, payload)

Send a reply payload to the peer identified by ZMQ identity.