[
https://issues.apache.org/jira/browse/KAFKA-6968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953277#comment-16953277
]
ASF GitHub Bot commented on KAFKA-6968:
---------------------------------------
efgpinto commented on pull request #7539: KAFKA-6968: Adds calls to listener on
rebalance of MockConsumer
URL: https://github.com/apache/kafka/pull/7539
The MockConsumer has a rebalance operation which receives a new set of
partitions to simulate the rebalance of a consumer group. However, the current
version is not calling the listener provided on subscription to notify the
client when partitions are revoked and assigned.
This MR calls both listeners on rebalance and adds a unit test to cover that.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Call RebalanceListener in MockConsumer
> --------------------------------------
>
> Key: KAFKA-6968
> URL: https://issues.apache.org/jira/browse/KAFKA-6968
> Project: Kafka
> Issue Type: Improvement
> Components: consumer
> Affects Versions: 1.1.0
> Reporter: Andras Beni
> Priority: Minor
>
> {{org.apache.kafka.clients.consumer.MockConsumer}} simulates rebalance with
> method {{public synchronized void rebalance(Collection<TopicPartition>
> newAssignment)}}. This method does not call {{ConsumerRebalanceListener}}
> methods. Calls to {{onPartitionsRevoked(...)}} and
> {{onPartitionsAssigned(...)}} should be added in appropriate order.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)