Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Custom endpoints

When a protocol isn’t built in, you can plug your own endpoint into the engine. A custom endpoint is selected from config by name and delegates to a factory you register programmatically before starting routes.

Config

output:
  custom:
    name: "my_sink"
    config: { target: "internal://thing" }
FieldTypeRequired
namestringyes — matches the registered factory
configany JSONyes — passed through to your factory

The custom endpoint works as a route input or output.

Implementing it

Implement the CustomEndpointFactory trait and register your type before starting routes. The factory receives the config JSON and builds an endpoint that speaks the engine’s MessageConsumer / MessagePublisher traits (in mq_bridge::traits), so your endpoint participates in batching, middleware, and ack/nack exactly like a built-in one.

See also