diff --git a/apps/emqx_ds_shared_sub/README.md b/apps/emqx_ds_shared_sub/README.md index 9c4c15870..a5b08ee26 100644 --- a/apps/emqx_ds_shared_sub/README.md +++ b/apps/emqx_ds_shared_sub/README.md @@ -7,7 +7,17 @@ This application makes durable session capable to cooperatively replay messages ![General layout](docs/images/ds_shared_subs.png) * The nesting reflects nesting/ownership of entity states. -* The bold arrow represent the [most complex interaction](https://github.com/emqx/eip/blob/main/active/0028-durable-shared-subscriptions.md#shared-subscription-session-handler), between session-side group subscription state machine and the shared subscription leader. +* The bold arrow represent the [most complex interaction](https://github.com/emqx/eip/blob/main/active/0028-durable-shared-subscriptions.md#shared-subscription-session-handler), between session-side group subscription state machine (**GroupSM**) and the shared subscription leader (**Leader**). + +# GroupSM and Leader communication + +The target state of GroupSM and its representation in Leader is `replaying`. That is, when the GroupSM and the Leader agree on the leased streams, Leader sends lease confirmations to the GroupSM, the GroupSM sends iteration updates. + +Other states are used to gracefully reassign streams to the GroupSM. + +Below is the sequence diagram of the interaction. + +![GroupSM and Leader communication](docs/images/groupsm_leader_communication.png) # Contributing diff --git a/apps/emqx_ds_shared_sub/docs/images/groupsm_leader_communication.png b/apps/emqx_ds_shared_sub/docs/images/groupsm_leader_communication.png new file mode 100644 index 000000000..48040ccea Binary files /dev/null and b/apps/emqx_ds_shared_sub/docs/images/groupsm_leader_communication.png differ