Open
Description
I’m trying to add an endpoint to my Spring app for batch ingestion of CloudEvents, but CloudEventHttpMessageConverter isn’t playing nice. It won’t convert to List.
What I Did
Built a Spring Boot app.
Added a REST endpoint to accept a batch of CloudEvents.
Set up CloudEventHttpMessageConverter for the conversion.
Sent a batch of CloudEvents to the endpoint.
What I Expected
I expected the converter to turn the HTTP request into a List.
What’s Actually Happening
It’s not working. The converter is failing and throwing an error instead of doing the conversion.
@RestController
public class CloudEventController {
@PostMapping("/ingest")
public ResponseEntity<String> ingestBatch(@RequestBody List<CloudEvent> events) {
// Processing logic
return ResponseEntity.ok("Batch ingested successfully");
}
}
Metadata
Metadata
Assignees
Labels
No labels