Message
public class Message
Represents an EventBus message with metadata.
-
The body (content) of the message.
Declaration
Swift
public var body: JSON -
True if this message was the result of a send (vs. publish)
Declaration
Swift
public var isSend: Bool -
Sends back a reply to this message
Throws
EventBus.Error.disconnected(cause:)if not connected to the remote bridgeDeclaration
Swift
public func reply(body: [String: Any], headers: [String: String]? = nil, replyTimeout: Int = 30000, // 30 seconds callback: ((Response) -> ())? = nil) throwsParameters
bodythe content of the message
headersheaders to send with the message (default:
[String: String]())replyTimeoutthe timeout (in ms) to wait for a reply if a reply callback is provided (default:
30000)callbackthe callback to handle the reply or timeout
Response(default:nil)
View on GitHub
Install in Dash
Message Class Reference