Normally, we expect simple utilities to respond with the POSIX exit code 0 on success, and something else (e.g. 1) when an error occurred.
root@871ff6bb412b:/opt/bin# publisher -hostname localhost:4466 -topic test_topic -message "Hello testing kafka" -partition 0
Publishing : Hello testing kafka
To: localhost:4466, topic: test_topic, partition: 0
----------------------
2019/06/04 21:35:20 Fatal Error: dial tcp 127.0.0.1:4466: connect: connection refused
2019/06/04 21:35:20 Sending took: 0.657800 ms
root@871ff6bb412b:/opt/bin# echo $?
0
The utility responds with 0 in the error case.
Normally, we expect simple utilities to respond with the POSIX exit code
0on success, and something else (e.g.1) when an error occurred.The utility responds with
0in the error case.