We use Kafka to process the asynchronous events of our Document Management System such as preview generation, indexing for search etc.
The traffic gets generated via Web and Desktop Sync application. In such cases, we had to prioritize the traffic from web and consume them first. But this might lead to the starvation of events from sync if the consumer speed is slow and the event rate is high from web. A solution to handle the starvation with a timeout after which the events are consumed normally for a specified period of time would be great and help us use our resources effectively.
The addition of new subscribe API that allows caller to prioritize topics. New class
Note that the issue of starvation of lower priority topics has been discussed in the most recent thread. The above API will be extended to handle starvation. One idea is to check the delta between the oldest messages in the different topics. The consumer would then revert to using no priorities when the delta reaches a max threshold for the delta, and then re-enable prioritization after achieving a min thresholdand is intended by design.
Compatibility, Deprecation, and Migration Plan