def publish(topic_uri, event, exclude = nil, elgible = nil)
      msg = [type[:PUBLISH], topic_uri, event]
      msg[3] = exclude unless exclude.nil?
      msg[4] = elgible unless elgible.nil?

      msg.to_json
    end
def publish(topic_uri, event, exclude = nil, elgible = nil)
      msg = [type[:PUBLISH], topic_uri, event]
      msg[3] = exclude unless exclude.nil?
      msg[4] = elgible unless elgible.nil?

      msg.to_json
    end
Builds the PubSub PUBLISH message (client to server)
 	[ TYPE_ID_PUBLISH , topicURI , event ]
 	[ TYPE_ID_PUBLISH , topicURI , event , excludeMe ]
 	[ TYPE_ID_PUBLISH , topicURI , event , exclude , eligible ]
 @param topic_uri [String] The topic URI or CURIE to publish the event to.
 @param payload [String, Array, Hash] The payload to be delivered to the
   server.
 @param exclude [true, false, Array<String>] Optional. Determines which
   clients to exclude from the delivery of the event from the server, you
   can give true or false will exclude/include the sending client, or give
   an Array of client ID's to exclude.
 @param elgible [Array<String>] Optional. An array lf client ID's elgible
   to receive the published message.
 @return [String] The PUBLISH message as a JSON string.