Cloud Director uses a traditional message broker to support many of the extensibility platform capabilities. Starting from version 10.2, a message broker comes pre-bundled with the product. The protocol used for communication is mqtt3.1.1.
This page is still under development
{vcd.host}/messaging/mqtt
QoS=0,1,2
are supported, and
QoS=1,2
- message loss may occur in case the broker stopsQoS=0
- message loss may occur even in case of network hiccupsclean start/session=true
clean start=false
is not supported, because the broker does not keep any persisted state, meaning on crash or restart any durable session will be forgotten/cloudapi/1.0.0/tokens
, type=EXTENSION
)payload
is a json/xml encoded string, etc); the type
sometimes dictates the payload type(BEHAVIOR_INVOCATION
=>InvocationArguments
), but other times it is additionally specified by headers.contentType
{
"type": "EVENT|EXTERNAL_EVENT|TASK|EXTENSION_TASK|API_REQUEST|API_RESPONSE|BEHAVIOR_INVOCATION|BEHAVIOR_RESPONSE",
"headers": {},
"payload": ""
}
Note:
This pattern is used throughout the extensibility platform and various features may themselves encode their payloads in terms of meta info+encoded payload in the main
payload
; for ex.BEHAVIOR_INVOCATION
wrapsHalfDuplexEnvelope
in itspayload
(InvocationArguments.arguments
) as a json encoded string and theHalfDuplexEnvelope
itself also encodes an object extension request/response in itspayload
(wherepayloadType
contains the name of the encoded payload schema)
QoS
(or clean start
)
QoS
level that is used; the higher the QoS
the less frequent the check may need to be; for most situations QoS=1
should be good enough, unless the check is very expensive to make; QoS=2
may be used as last resort, as that is very taxing on the broker and may lower the overall performance of Cloud Director itselfQoS
should be viewed as levels of guarantee that a message transfer between broker and client will succeed, but it does not directly guarantee a message transfer between a publisher
and a subscriber
QoS=1
(at least once)