⚠️ Important
The current MQTT communication architecture, including the VCF Automation Provider Management message broker and MQTT framework, is subject to change in future VCF Automation releases. To ensure long-term compatibility, account for these possible upcoming changes when designing extensions within the extensibility framework.
VCF Automation Provider Management uses a traditional message broker to support many of the extensibility platform capabilities. A message broker comes pre-bundled with the product. The protocol used for communication is MQTT - mqtt3.1.1 and mqtt5.0 are supported.
{vcfa.host}/messaging/mqttQoS=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_INVOCATIONwrapsHalfDuplexEnvelopein itspayload(InvocationArguments.arguments) as a json encoded string.
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 VCF Automation Provider Management 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 subscriberQoS=1 (at least once)