Saturday 8 September 2012

Message Hub

At the minute I'm having to push a lot of JSON around. To aid in this I've written msgHub. This utility sets up a TCP server allowing the pub/sub of generic JSON data. I've found it to be extremely useful; you might too.


msgHub -tcpPort=[port] -tcpDelimiter=[ascii code]
e.g. start on 12345 using line feed as delimiter
msgHub -tcpPort=12345 -tcpDelimiter=10
JSON message format:
{"event": "sub", "type": "messageType", "key": "messageKey"}
{"event": "unsub", "type": "messageType", "key": "messageKey"}
{"event": "pub", "type": "messageType", "key": "messageKey", ........ any json}