THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
PlantUML Render Macro | ||
---|---|---|
| ||
@startuml |
Step | Thread | Starting State | Ending State | Notes |
---|---|---|---|---|
1 | Background | Stable | Stable | No new assignments are included in the heartbeat response. |
2 | Background | Stable | Updating | When the heartbeat response contains a new assignment, this is passed to the MemberAssignmentReconciler along with the current set of assigned partitions. |
3 | Background | Updating | Updating | The MemberAssignmentReconciler will compare the new assignment against the current assignment to determine any newly revoked partitions. |
4 | Background | Updating | Revoking via Callback | If there are partitions that need to be revoked and there is a |
5 | Background | Updating | Assigning | If there are no partitions to revoke or there is no |
6 | Application | Revoking via Callback | Revoking via Callback | When the user next invokes Consumer.poll() , the events from the background event queue will be examined and acted upon. When the RevokePartitionsEvent is processed, the ConsumerRebalanceListener.onPartitionsRevoked() method will be invoked, passing along the partitions contained within the event. |
7 | Application | Revoking | Revoking | After onPartitionsRevoked() has been successfully(?) invoked, the Consumer will enqueue a PartitionsRevokedEvent containing the set of partitions that were revoked onto the queue that flows from the application thread back to the background thread. |
8 | Background | Revoking | Awaiting Revocation Confirmation | Read the events of the application event queue and invoke the appropriate ApplicationEventProcessor handler for the PartitionsRevokedEvent . This will invoke the MemberAssignmentReconciler.onRevocation() method to update its state. |
9 | Background | Awaiting Revocation Confirmation | Awaiting Revocation Confirmation | The |
9 | Background | Awaiting Revocation Confirmation | Updating | When the heartbeat response confirms (how?) that the revocation has been acknowledged by the coordinator, we can move to step 2. |
10 | Background | Updating | Updating | The MemberAssignmentReconciler will compare the new assignment against the current assignment to determine any newly assigned partition sets. |
11 | Background | Updating | Assigning via Callback | If there are partitions that need to be assigned and there is a ConsumerRebalanceListener, the MemberAssignmentReconciler will enqueue an AssignPartitionsEvent containing the set of partitions to assign onto the queue that flows from the background thread to the application thread. |
12 | If there are no partitions to assign or there is no ConsumerRebalanceListener, skip to step 1 | |||
13 | Application | Assigning via Callback | When the user next invokes Consumer.poll(), the events from the background event queue will be examined and acted upon. When the AssignPartitionsEvent is processed, the ConsumerRebalanceListener's onPartitionsAssigned() method will be invoked, passing along the partitions contained within the event. | |
14 | ||||
15 | ||||
13 | ||||
14 | ||||
19 |