@@ -84,6 +84,29 @@ 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. If the partition list is empty
106+ * all partitions will be revoked.
107+ */
108+ virtual void revoke (const TopicPartitionList& partitions = {});
109+
87110protected:
88111 /* *
89112 * \brief Get the queues from all assigned partitions
@@ -111,8 +134,8 @@ class CPPKAFKA_API PollStrategyBase : public PollInterface {
111134 /* *
112135 * \brief Function to be called when a new partition assignment takes place
113136 *
114- * This method contains a default implementation. It adds all the new queues belonging
115- * to the provided partition list and calls reset_state() .
137+ * This method contains a default implementation. It calls assign()
138+ * and invokes the user assignment callback .
116139 *
117140 * \param partitions Assigned topic partitions
118141 */
@@ -121,8 +144,8 @@ class CPPKAFKA_API PollStrategyBase : public PollInterface {
121144 /* *
122145 * \brief Function to be called when an old partition assignment gets revoked
123146 *
124- * This method contains a default implementation. It removes all the queues
125- * belonging to the provided partition list and calls reset_state() .
147+ * This method contains a default implementation. It calls revoke()
148+ * and invokes the user revocation callback .
126149 *
127150 * \param partitions Revoked topic partitions
128151 */
0 commit comments