1

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 Answers1

0

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

nngcat --bus --listen="tcp://127.0.0.1:8000" -A
  • Vitaliy, sorry for the late reply. The -A flag enables receiving the message by A1, which was sent from a "dial" endpoint (like A2, using the flags --dial=".." --data="..") to the listening endpoint (A1). But the message is not received by the other bus "dial" endpoint: for example, if A2 sent the message to the "bus", I would have expected A3 to receive it too, when A3 uses the flags --dial and -A. – nopainnogain Mar 07 '19 at 11:06