Example of a bus using nngcat command line tool

425 Views Asked by At

nngcat (nng's command line tool) allows one to use the --bus flag.

I want to send data from A1 process to A2 and A3 processes using the "--bus" flag of nngcat. (I know pub/sub and req/rep can also be used for that; the tool works wonderful with those). Starting the bus works:

nngcat --bus --listen="tcp://127.0.0.1:8000"

Connecting A2 and A3 to the bus using something like below works:

nngcat --bus --dial="tcp://127.0.0.1:8000"

But how does one now send data from A1 to A2 and A3? Using --data="my string" does not seem to have the expected result.

[EDIT]: nngcat belongs to nng 1.1.1

1

There are 1 best solutions below

1
Vitaliy Gusev On

You should add -A or -Q, i.e. specify format:

nngcat --bus --listen="tcp://127.0.0.1:8000" -A