eventing icon indicating copy to clipboard operation
eventing copied to clipboard

Ignore sent messages response body is not empty

Open lukogex opened this issue 2 years ago • 3 comments

Problem Some of the services in our system do not return a valid cloud event or an empty body response which leads to lost events due to 502 Bad Gateway error.

Log message: Received a non-empty response not recognized as CloudEvent. The response MUST be either empty or a valid CloudEvent.

Persona:

  • Event consumer

Exit Criteria It should be possible to add third party consumers which do not send either empty or valid cloud event responses.

Time Estimate (optional): As I had to solve this for our knative eventing installation I opened a PR already for the changes we made.

lukogex avatar May 20 '22 06:05 lukogex

Hi @lukogex, did you consider creating your own function that just ignores the response?

Like

Broker -> Trigger -> < Service/Function that ignores the response> -> <service that doesn't return a valid CloudEvent>

pierDipi avatar May 26 '22 10:05 pierDipi

Hi @lukogex, did you consider creating your own function that just ignores the response?

Like

Broker -> Trigger -> < Service/Function that ignores the response> -> <service that doesn't return a valid CloudEvent>

Hi ... yes we did. We even had such kind of services in place to tackle slow consumer problems we had. But our experience is that this makes things just more complex and raise the feeling we need an adapter for the adapter. Knative eventing itself is already hard to understand when not yet familiar with it and each additional added step makes monitoring and understanding even harder. The purpose for using it in our setup is the abstraction layer to the eventing system and easy integration for every service. Dropping a valid http response because the body is not like expected was causing a lot of troubles for us.

We also removed the other service we had and opened a PR for the nats dispatcher as this is the far better solution. We have this changes already running in production for our knative eventing installation and it performs better and reduces maintenance effort.

From my point of view this behavior is against the purpose of using knative eventing at all and I see no reason why we can not trust the http response code and ignore the body, may you can explain me that in more detail? Of course I'm focused on our needs and may miss some information.

lukogex avatar May 31 '22 08:05 lukogex

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Aug 30 '22 01:08 github-actions[bot]