This seems to cause an infinite loop, since it's the same message headers, creating the same message with no payload. I'm not sure if I'm doing something incorrect here or if it's not the intended use case for spring-cloud-function. If I create an endpoint, then the event propagation doesn't occur (since there are no ce headers):
@Bean
fun router(): RouterFunction<ServerResponse> = coRouter {
POST("/events/log") { req ->
val body = req.awaitBody<String>()
logger.error { body }
accepted().buildAndAwait()
}
}
I'm trying out spring-cloud-function with a KNative installation. I have simple spring boot application with the following configuration:
When I set up a KNative trigger to call
/events/log
with a cloud event, the response creates a new cloud event to be triggered with an empty payload:This seems to cause an infinite loop, since it's the same message headers, creating the same message with no payload. I'm not sure if I'm doing something incorrect here or if it's not the intended use case for spring-cloud-function. If I create an endpoint, then the event propagation doesn't occur (since there are no ce headers):