I want to define a flow that writes to MongoDB, and only on success writes the IDs to Kafka. I'm using the JavaDSL, and I'd wish to have a FlowBuilder
class that defines my pipeline at a high level. I'm searching for the features that will enable me to write a flow such as:
public IntegrationFlow buildFlow() {
return IntegrationFlows.from(reactiveKafkaConsumerTemplate)
.process(writeToMongo) // <-- Searching for this kind of function
.handle(writeToKafka)
.get();
}
I've seen that Apache Camel works exactly like this and I wonder if Spring Integration has a simple and good solution to this basic problem either.