From 5eef99f624178d45b2eae35e433eb8a70153a53d Mon Sep 17 00:00:00 2001 From: Timothy McCallum Date: Fri, 28 Jun 2024 09:42:42 +1000 Subject: [PATCH] Update to reflect new app manifest that templates now creates Signed-off-by: tpmccallum tim.mccallum@fermyon.com Signed-off-by: Timothy McCallum --- .../spin-trigger-mqtt/installation/_index.md | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/content/en/docs/spin-trigger-mqtt/installation/_index.md b/content/en/docs/spin-trigger-mqtt/installation/_index.md index 1e369043..396693c3 100644 --- a/content/en/docs/spin-trigger-mqtt/installation/_index.md +++ b/content/en/docs/spin-trigger-mqtt/installation/_index.md @@ -53,21 +53,29 @@ The `address`, `username`, `password` and `topic` support the ability to b The application manifest will look similar to the following: ``` -spin_manifest_version = "1" -authors = ["Fermyon Engineering "] -description = "Demo app to receive MQTT messages." +spin_manifest_version = 2 + +[application] name = "mqtt-app" -trigger = { type = "mqtt", address = "mqtt://localhost:1883", username = "user", password = "password", keep_alive_interval = "30" } version = "0.1.0" +authors = ["Fermyon Engineering "] +description = "Demo app to receive MQTT messages." -[[component]] -id = "mqtt-app" +[application.trigger.mqtt] +address = "mqtt://localhost:1883" +username = "user" +password = "password" +keep_alive_interval = "30" + +[[trigger.mqtt]] +component = "mqtt-app" +topic = "mytopic" +qos = "1" + +[component.mqtt-app] source = "target/wasm32-wasi/release/mqtt_app.wasm" allowed_outbound_hosts = ["mqtt://localhost:1883"] -[component.trigger] -topic = "topic" -qos = "1" -[component.build] +[component.mqtt-app.build] command = "cargo build --target wasm32-wasi --release" ``` @@ -75,4 +83,4 @@ To build the application we use the `spin build` command: ```bash $ spin build -``` \ No newline at end of file +```