command-response

command
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

README

command-response

Request-reply over DDS using rpc.Requester and rpc.Replier (OMG DDS-RPC pattern).

Pattern: typed RPC built on two topics (<service>/request, <service>/reply) with correlation IDs for in-flight request matching.

Run

go run .

What it shows

Concept Where
rpc.NewRequester[Req, Rep] client-side typed RPC
rpc.NewReplier[Req, Rep] server-side typed RPC
Replier.Requests() channel iterates inbound requests
Replier.Reply sends a correlated reply
dds.ReliableQoS required for RPC — ensures no lost requests or replies

Expected output

sent: hello       got: HELLO       from: echo-server-1
sent: world       got: WORLD       from: echo-server-1
sent: go-dds      got: GO-DDS      from: echo-server-1
sent: rpc         got: RPC         from: echo-server-1
sent: works       got: WORKS       from: echo-server-1

Documentation

Overview

command-response demonstrates the OMG DDS-RPC request-reply pattern using rpc.Requester and rpc.Replier built on two DDS topics.

Run with:

go run .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL