nanobus.transport.dapr/v1
Description
IntegrationSource code
This transport create a Dapr gRPC server able to receive events from Dapr's PubSub or Input Bindings building blocks.
Running Dapr locally with NanoBus
dapr run --app-id hello-world --app-port 19090 --app-protocol grpc -- nanobus run --debug
Options
type Subscription
pubsub
string
topic
string
metadata
Map<string,string>
types
Map<string,Handler>
handler
Handler
codec
CodecRef
disableTopicValidation
bool
type Binding
Examples
Basic configuration
- YAML
- TypeScript
transports:
dapr:
uses: nanobus.transport.dapr/v1
with:
subscriptions:
- pubsub: pubsub
topic: orders
codec: cloudevents+json
handler: Events::onOrder ## Defined in an interface
import { DaprServerV1 } from "https://deno.land/x/nanobusconfig@v0.0.14/mod.ts";
app.transport(
"dapr",
DaprServerV1({
subscriptions: [{
pubsub: 'pubsub',
topic: 'orders',
codec: 'cloudevents+json',
// Defined in an interface
handler: Events.onOrder,
}],
}),
);