changed names
This commit is contained in:
parent
81fd140346
commit
072726dd06
@ -23,7 +23,7 @@ func handleMessage(msg types.BrokerMessage) cm.Result[string, struct{}, string]
|
|||||||
|
|
||||||
// TODO implement the logic to get the destination topic from the config
|
// TODO implement the logic to get the destination topic from the config
|
||||||
// dest_topic := config.GetAll()
|
// dest_topic := config.GetAll()
|
||||||
dest_topic := msg.Subject + ".reply"
|
dest_topic := "finish"
|
||||||
|
|
||||||
// TASK
|
// TASK
|
||||||
|
|
||||||
|
180
wadm.yaml
180
wadm.yaml
@ -1,91 +1,91 @@
|
|||||||
apiVersion: core.oam.dev/v1beta1
|
apiVersion: core.oam.dev/v1beta1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: go-data-stream
|
name: go-data-stream
|
||||||
annotations:
|
annotations:
|
||||||
description: 'Data stream processing using NATS topic in Golang (TinyGo), using the WebAssembly Component Model and WebAssembly Interfaces Types (WIT)'
|
description: 'Data stream processing using NATS topic in Golang (TinyGo), using the WebAssembly Component Model and WebAssembly Interfaces Types (WIT)'
|
||||||
wasmcloud.dev/authors: Lorenzo Venerandi
|
wasmcloud.dev/authors: Lorenzo Venerandi
|
||||||
wasmcloud.dev/source-url: https://gitea.rebus.ninja/lore/wasm-nats-stream-client.git/wadm.yaml
|
wasmcloud.dev/source-url: https://gitea.rebus.ninja/lore/wasm-nats-stream-client.git/wadm.yaml
|
||||||
wasmcloud.dev/readme-md-url: https://gitea.rebus.ninja/lore/wasm-nats-stream-client.git/README.md
|
wasmcloud.dev/readme-md-url: https://gitea.rebus.ninja/lore/wasm-nats-stream-client.git/README.md
|
||||||
wasmcloud.dev/homepage: https://gitea.rebus.ninja/lore/wasm-nats-stream-client.git
|
wasmcloud.dev/homepage: https://gitea.rebus.ninja/lore/wasm-nats-stream-client.git
|
||||||
wasmcloud.dev/categories: |
|
wasmcloud.dev/categories: |
|
||||||
stream-processing,nats-client,tinygo,golang
|
stream-processing,nats-client,tinygo,golang
|
||||||
spec:
|
spec:
|
||||||
components:
|
components:
|
||||||
- name: go-data-stream
|
- name: go_stream_processor
|
||||||
type: component
|
type: component
|
||||||
properties:
|
properties:
|
||||||
# To use the locally compiled code in this folder, use the line below instead after running `wash build`:
|
# To use the locally compiled code in this folder, use the line below instead after running `wash build`:
|
||||||
# image: file://./build/echo_messaging_s.wasm
|
# image: file://./build/echo_messaging_s.wasm
|
||||||
image: gitea.rebus.ninja/lore/wasm-nats-stream-client:1.0.1
|
image: gitea.rebus.ninja/lore/wasm-nats-stream-client:1.0.3
|
||||||
id: stream
|
id: stream
|
||||||
config:
|
config:
|
||||||
- name: nats-topic
|
- name: nats-topic
|
||||||
properties:
|
properties:
|
||||||
dest-topic: wasmcloud.echo.reply
|
dest-topic: wasmcloud.echo.reply
|
||||||
traits:
|
traits:
|
||||||
# Govern the spread/scheduling of the component
|
# Govern the spread/scheduling of the component
|
||||||
- type: spreadscaler
|
- type: spreadscaler
|
||||||
properties:
|
properties:
|
||||||
instances: 1
|
instances: 1
|
||||||
spread:
|
spread:
|
||||||
- name: cloud
|
- name: cloud
|
||||||
weight: 100
|
weight: 100
|
||||||
requirements:
|
requirements:
|
||||||
host-type: cloud
|
host-type: cloud
|
||||||
- name: edge
|
- name: edge
|
||||||
weight: 0
|
weight: 0
|
||||||
requirements:
|
requirements:
|
||||||
host-type: edge
|
host-type: edge
|
||||||
# Establish a unidirectional link to the messaging capability provider (powered by NATS),
|
# Establish a unidirectional link to the messaging capability provider (powered by NATS),
|
||||||
# so the `echo` component can make use of messaging interface functionality
|
# so the `echo` component can make use of messaging interface functionality
|
||||||
# (i.e. making interacting with the messaging system, in this case NATS)
|
# (i.e. making interacting with the messaging system, in this case NATS)
|
||||||
- type: link
|
- type: link
|
||||||
properties:
|
properties:
|
||||||
target: nats
|
target: nats
|
||||||
namespace: wasmcloud
|
namespace: wasmcloud
|
||||||
package: messaging
|
package: messaging
|
||||||
interfaces: [consumer]
|
interfaces: [consumer]
|
||||||
|
|
||||||
# Add a capability provider that implements `wasmcloud:messaging` using NATS
|
# Add a capability provider that implements `wasmcloud:messaging` using NATS
|
||||||
- name: nats
|
- name: nats
|
||||||
type: capability
|
type: capability
|
||||||
properties:
|
properties:
|
||||||
image: ghcr.io/wasmcloud/messaging-nats:0.23.1
|
image: ghcr.io/wasmcloud/messaging-nats:0.23.1
|
||||||
## To configure OTEL integration for this provider specifically, uncomment the lines below
|
## To configure OTEL integration for this provider specifically, uncomment the lines below
|
||||||
# config:
|
# config:
|
||||||
# - name: otel
|
# - name: otel
|
||||||
# properties:
|
# properties:
|
||||||
# otel_exporter_otlp_endpoint: "http://all-in-one:4318"
|
# otel_exporter_otlp_endpoint: "http://all-in-one:4318"
|
||||||
# otel_exporter_otlp_traces_endpoint: "http://traces-backend/v1/traces"
|
# otel_exporter_otlp_traces_endpoint: "http://traces-backend/v1/traces"
|
||||||
# otel_exporter_otlp_metrics_endpoint: "http://metrics-backend/v1/metrics"
|
# otel_exporter_otlp_metrics_endpoint: "http://metrics-backend/v1/metrics"
|
||||||
# otel_exporter_otlp_logs_endpoint: "http://logs-backend/v1/logs"
|
# otel_exporter_otlp_logs_endpoint: "http://logs-backend/v1/logs"
|
||||||
traits:
|
traits:
|
||||||
# Since the `nats` capability provider calls an component to handle messages
|
# Since the `nats` capability provider calls an component to handle messages
|
||||||
# coming over subscriptions, this provider needs a unidirectional link to the
|
# coming over subscriptions, this provider needs a unidirectional link to the
|
||||||
# component that wil be called.
|
# component that wil be called.
|
||||||
#
|
#
|
||||||
# Here we link the `nats` provider (the "source"), to the `echo` component (the "target"),
|
# Here we link the `nats` provider (the "source"), to the `echo` component (the "target"),
|
||||||
# so that so the provider can deliver messages to the component (by invoking the wasmcloud:messaging/handler interface) .
|
# so that so the provider can deliver messages to the component (by invoking the wasmcloud:messaging/handler interface) .
|
||||||
- type: link
|
- type: link
|
||||||
properties:
|
properties:
|
||||||
target: go-data-stream
|
target: go_stream_processor
|
||||||
namespace: wasmcloud
|
namespace: wasmcloud
|
||||||
package: messaging
|
package: messaging
|
||||||
interfaces: [handler]
|
interfaces: [handler]
|
||||||
source_config:
|
source_config:
|
||||||
- name: simple-subscription
|
- name: simple-subscription
|
||||||
properties:
|
properties:
|
||||||
subscriptions: streaming
|
subscriptions: streaming
|
||||||
- type: spreadscaler
|
- type: spreadscaler
|
||||||
properties:
|
properties:
|
||||||
instances: 1
|
instances: 1
|
||||||
spread:
|
spread:
|
||||||
- name: cloud
|
- name: cloud
|
||||||
weight: 100
|
weight: 100
|
||||||
requirements:
|
requirements:
|
||||||
host-type: cloud
|
host-type: cloud
|
||||||
- name: edge
|
- name: edge
|
||||||
weight: 0
|
weight: 0
|
||||||
requirements:
|
requirements:
|
||||||
host-type: edge
|
host-type: edge
|
Loading…
Reference in New Issue
Block a user