Change publisher port to correct type

Fixes a bug that messages were dropped
Use correct encoding / decoding of the properties

Remove the json part and replace with "name=value<newline>" as defined
in CHP specification at http://rfc.zeromq.org/spec:12: