Skip to content

Routers

Full list


Content-Based

Fans out events to selected destinations, with optional filtering conditions based on context attributes and/or the data payload.

router content_based "dispatch" {

  route {
    //to = <component>.<identifier>
  }

  route {
    attributes = {
      type: "com.amazon.sqs.message"
      source: "arn:aws:sqs:us-east-2:123456789012:my-queue"
    }

    //to = <component>.<identifier>
  }

  route {
    condition = "$user.id.(int64) % 2 == 0"

    //to = <component>.<identifier>
  }

}

Data Expression Filter

router data_expression_filter "uid_is_even" {
  condition = "$user.id.(int64) % 2 == 0"

  //to = <component>.<identifier>
}

Splitter

router splitter "split_users" {
  path = ".items"

  ce_context {
    type = "ldap.user"
    source = "ldap://mycompany"
    extensions = {
      uid: "{.details.user_id}"
    }
  }

  //to = <component>.<identifier>
}
Back to top