zalando / nakadi

A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
https://nakadi.io
MIT License
952 stars 293 forks source link

Add configurable timeout for publishing #1583

Open samizzy opened 5 months ago

samizzy commented 5 months ago

One-line summary

Zalando ticket : 1622

Description

Add ability to specify timeout when using publishing apis and is taken from custom header X-TIMEOUT.

adyach commented 5 months ago

there is a problem with this approach: client sets 300ms timeout, connection is close by Nakadi due to timeout (300ms), but Kafka Producer continues to retry events for this request for the 29 700ms. this is a problem by itself for Nakadi, what if there are many more such requests but also it can be that the event will appear in the middle of the other published batch breaking the order.