FlowDSL
Studio
Spec

Runtime Bindings Reference

The x-runtime extension for binding FlowDSL delivery modes to specific infrastructure.

Runtime bindings allow you to configure delivery mode infrastructure at the edge level — overriding the runtime's defaults for a specific edge. Use them when you need non-default MongoDB collections, Redis streams, or Kafka topics.

x-runtime extension

yaml
edges:
  - from: ProcessOrder
    to: NotifyFulfillment
    delivery:
      mode: durable
      packet: OrderProcessed
    x-runtime:
      mongodb:
        collection: orders.fulfillment_queue    # Override default collection name
        writeConcern: majority                   # "majority" or "1"
        readPreference: primaryPreferred

  - from: IngestEvent
    to: ProcessEvent
    delivery:
      mode: ephemeral
      stream: high-priority-events
    x-runtime:
      redis:
        keyPrefix: "flowdsl:hp:"   # Custom key prefix
        maxLen: 1000000
        trimStrategy: maxlen        # "maxlen" or "minid"

  - from: PublishResult
    to: ExternalConsumers
    delivery:
      mode: stream
      topic: results.processed
    x-runtime:
      kafka:
        acks: all                   # "0", "1", or "all"
        compression: lz4            # "none", "gzip", "snappy", "lz4", "zstd"
        batchSize: 16384
        lingerMs: 5

MongoDB binding fields

FieldTypeDefaultDescription
collectionstring{flowId}.packetsMongoDB collection name
writeConcernstring"1""1" or "majority"
readPreferencestring"primary""primary", "primaryPreferred", "secondary"

Redis binding fields

FieldTypeDefaultDescription
keyPrefixstring"flowdsl:"Prefix for Redis keys
maxLeninteger100000Maximum stream length
trimStrategystring"maxlen""maxlen" or "minid"

Kafka binding fields

FieldTypeDefaultDescription
acksstring"1"Producer acknowledgment: "0", "1", or "all"
compressionstring"none"Compression codec
batchSizeinteger16384Producer batch size in bytes
lingerMsinteger0Producer linger time in milliseconds

When to use runtime bindings

Most flows do not need x-runtime — the runtime's defaults are appropriate for the vast majority of use cases.

Use x-runtime when:

  • You need to use a specific MongoDB collection for compliance or monitoring
  • You need Kafka acks: all for a specific edge that requires stronger durability
  • You are tuning Kafka producer settings for high-throughput edges
  • You need to share a Redis stream with non-FlowDSL consumers

Next steps

Copyright © 2026