kafka icon indicating copy to clipboard operation
kafka copied to clipboard

Mechanism to allow a user to unsubscribe from individual topics

Open cmccarthy1 opened this issue 4 years ago • 1 comments

Internal Feature Request

Is your feature request related to a problem? Please describe. The addition of the ability to subscribe to multiple topics in v1.4.0 of this interface, however the unsubscribe functionality is asymmetric to this allowing for subscriptions from all topics to be completed only.

Describe the solution you'd like The underlying functionality which controls unsubscriptions within the current api calls the librdkafka function rd_kafka_unsubscribe to achieve unsubscriptions. This is essentially the same as calling subscribe with no topics which doesn't provide sufficient granularity.

This is outlined here.

Describe alternatives you've considered Exposure of the assignment interface appears to allow a level of granularity that would begin to allow this to be achieved. This allows a user to remove the consumption of data from particular topic/partition pairs and could form the basis for a solution.

Additional resource Prototypes for the C code which may be useful for exposure of the Assignment function calls are available here

cmccarthy1 avatar Jun 05 '20 14:06 cmccarthy1

consume_start/stop is not feasible because index of a topic is not visible for consumer unless the topic is created in the same process. So the deleting the assignment might be the only way to do this.

mshimizu-kx avatar Mar 18 '21 15:03 mshimizu-kx