@@ -84,6 +84,36 @@ class CPPKAFKA_API PollStrategyBase : public PollInterface {
8484 */
8585 Consumer& get_consumer () final ;
8686
87+ /* *
88+ * \brief Creates partitions queues associated with the supplied partitions.
89+ *
90+ * This method contains a default implementation. It adds all the new queues belonging
91+ * to the provided partition list and calls reset_state().
92+ * To be used with static consumers.
93+ *
94+ * \param partitions Assigned topic partitions.
95+ */
96+ virtual void assign (TopicPartitionList& partitions);
97+
98+ /* *
99+ * \brief Removes partitions queues associated with the supplied partitions.
100+ *
101+ * This method contains a default implementation. It removes all the queues
102+ * belonging to the provided partition list and calls reset_state().
103+ * To be used with static consumers.
104+ *
105+ * \param partitions Revoked topic partitions.
106+ */
107+ virtual void revoke (const TopicPartitionList& partitions);
108+
109+ /* *
110+ * \brief Removes all partitions queues associated with the supplied partitions.
111+ *
112+ * This method contains a default implementation. It removes all the queues
113+ * currently assigned and calls reset_state(). To be used with static consumers.
114+ */
115+ virtual void revoke ();
116+
87117protected:
88118 /* *
89119 * \brief Get the queues from all assigned partitions
@@ -111,8 +141,8 @@ class CPPKAFKA_API PollStrategyBase : public PollInterface {
111141 /* *
112142 * \brief Function to be called when a new partition assignment takes place
113143 *
114- * This method contains a default implementation. It adds all the new queues belonging
115- * to the provided partition list and calls reset_state() .
144+ * This method contains a default implementation. It calls assign()
145+ * and invokes the user assignment callback .
116146 *
117147 * \param partitions Assigned topic partitions
118148 */
@@ -121,8 +151,8 @@ class CPPKAFKA_API PollStrategyBase : public PollInterface {
121151 /* *
122152 * \brief Function to be called when an old partition assignment gets revoked
123153 *
124- * This method contains a default implementation. It removes all the queues
125- * belonging to the provided partition list and calls reset_state() .
154+ * This method contains a default implementation. It calls revoke()
155+ * and invokes the user revocation callback .
126156 *
127157 * \param partitions Revoked topic partitions
128158 */
0 commit comments