I am using Spring Cloud Stream.
How can I produce a Kafka message from a REST controller route handler method?
@RestController
public final class TransactionController {
@PostMapping("/transactions")
public void recordTransaction(final RecordTransaction recordTransaction) {
// I want to produce a TransactionRecorded event through Kafka here
}
}