Skip to main content
Version: v2.0.0

Spring connector

Audience: operators bridging EventMesh with Spring. Spring application bridge. Source buffers events published by Spring code (register a producer that feeds the buffer); sink exposes an injectable EventForwarder so the hosting Spring context receives EventMesh deliveries as native events.


Classes

DirectionClassBehavior
Sourceorg.apache.eventmesh.connector.spring.source.SpringSourceConnectorA LinkedBlockingQueue feeds poll(); host Spring code (e.g. an @EventListener adapter) enqueues CloudEvents.
Sinkorg.apache.eventmesh.connector.spring.sink.SpringSinkConnectorCalls the injected EventForwarder.forward(event) per CloudEvent. Fail-fast: until the Spring context wires a forwarder via setForwarder(...), put() throws so the runtime redelivers instead of silently dropping events.

Source configuration

KeyDefaultDescription
(none)The source needs no external config

Sink configuration

KeyDefaultDescription
(none)Wire the forwarder programmatically from the Spring context

Running

Host inside a Spring Boot app; call SpringSinkConnector.setForwarder(event -> publisher.publishEvent(...)) after init