Publish Subscribe
The functional interface for supporting communication via publish and subscribe.
Providing CLI package | Interface type-key |
---|---|
devenv-runtimes |
pubsub |
Description
This interface type introduces a dependency to a publish and subscribe middleware. While this may change in the future due to new middlewares being adopted, at the moment this will always indicate a dependency to MQTT.
If a Vehicle App requires pubsub
- this will influence the generated deployment specs to include a publish and subscribe broker (i.e. an MQTT broker).
If a Vehicle App provides pubsub
- this will influence the generated deployment specs to include a publish and subscribe broker (i.e. an MQTT broker).
Configuration structure
Attribute | Type | Example value | Description |
---|---|---|---|
reads |
array[string] | [ "sampleapp/getSpeed" ] |
Array of topics which are read by the application. |
writes |
array[string] | [ "sampleapp/currentSpeed", "sampleapp/getSpeed/response" ] |
Array of topics which are written by the application. |
Example
{
"type": "pubsub",
"config": {
"reads": [ "sampleapp/getSpeed" ],
"writes": [ "sampleapp/currentSpeed", "sampleapp/getSpeed/response" ]
}
}