Skip to content

Add streaming send --format json sink (RELAY v1.8 crossbar spoke) #21

@SoundMatt

Description

@SoundMatt

RELAY spec v1.8 (release) adds the crossbar router (relay crossbar), which connects implementations as spokes by piping each one's own subscribe/send. To be a crossbar spoke, cpp-RCP needs a streaming JSON sink.

What to implement (§11.2)

send --format json (no protocol flags) MUST read a stream of relay.Message values as NDJSON on stdin (one per line) and publish each until EOF. This is the egress dual of subscribe --format json (which already writes that NDJSON to stdout). The message's canonical fields (§15.7) carry everything needed to publish — no per-protocol flags.

Why

RELAY's crossbar sources from subscribe --format json and sinks to send --format json, so it is protocol-uniform and links no implementation at runtime. Without the JSON sink, cpp-RCP can be a crossbar source but not a destination.

Note on the existing send

cpp-RCP's current send is an ad-hoc, positional CLI that does not match the §11.2 flag table — that is a separate conformance gap. The streaming JSON form is the portable one the crossbar relies on; please add it alongside (it can share the same publish path as subscribe's decode).

No changes are requested to RELAY.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions