eventStreamsRouteCreate
Creates a new message route
Description: Creates a new route in the specified environment. The route defines an input topic to consume from, filter groups that evaluate message properties to determine routing, and a default output topic for messages that don't match any filter. The route starts in STARTING status after creation and transitions to RUNNING once Pulsar confirms the function is active.
Input:
input:EventStreamsRouteInput!— Route configuration including environment, name, input/output topics, and filters.
Error Codes:
ROUTE_ALREADY_EXISTS— A route with the same name already exists in the environment.ROUTE_TOPIC_LOOP— Input topic cannot be used as an output or default output topic.
Example:
mutation {
eventStreamsRouteCreate(input: {
environmentId: "e0900205-7996-4795-9092-b9d2a21b77e9"
name: "order-routing"
inputTopic: "incoming-orders"
subscriptionName: "order-routing-sub"
defaultOutputTopic: "unmatched-orders"
filters: [
{
name: "high-priority"
outputTopic: "priority-orders"
conditions: [
{
key: "priority"
value: "high"
valueType: STRING
operationType: EQUALS
}
]
},
{
name: "large-orders"
outputTopic: "large-orders"
conditions: [
{
key: "amount"
value: "1000"
valueType: NUMBER
operationType: GREATER_THAN
},
{
key: "currency"
value: "USD"
valueType: STRING
operationType: EQUALS
logicalOperator: AND
}
]
}
]
}) {
environmentId
name
inputTopic
subscriptionName
defaultOutputTopic
status
filters {
name
outputTopic
conditions {
key
value
valueType
operationType
logicalOperator
}
}
}
}
eventStreamsRouteCreate(
input: EventStreamsRouteInput!
): EventStreamsRoute!
Arguments
eventStreamsRouteCreate.input ● EventStreamsRouteInput! non-null input event-streams-admin
Type
EventStreamsRoute object event-streams-admin
A message routing rule that filters and routes messages based on metadata properties
Was this topic helpful?