[
https://issues.apache.org/jira/browse/TUBEMQ-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17179547#comment-17179547
]
Guocheng Zhang edited comment on TUBEMQ-319 at 8/18/20, 11:03 AM:
------------------------------------------------------------------
I understand that the problem with this requirement is that the pull request
can not specify the partition to pull, which causes the user to be unable to
perform fine control operations when it wants to suspend the consumption of a
certain partition.
In response to this problem, the plan is divided into two parts: in the current
stage, the plan is to be controlled on the SDK side to support the client to
call the API to freeze the local consumption of the specified partition; after
the subsequent support of the client partition allocation function, the user
can freely specify the consumption of the partition.
!screenshot-1.png!
After the SDK is started, the business logic first obtains the partition
currently allocated to the partition and the consumption offset through
getCurConsumedPartitions(); when the user needs to freeze the consumption of
some partitions, the freeze setting is performed through freezePartitions(),
and the subsequent specified consumer group does not It is scheduled; when the
business needs to view the frozen partition set, the frozen partition is
obtained by calling getFrozenPartInfo(), and the frozen partition can only be
unfreeze operation through unfreezePartitions(), relAllFrozenPartitions(); if
all partitions are frozen, the push stops pulling and the pull request makes
the getMessage() call, and the error message "All partition are frozen to
consume, please unfreeze partition(s) or wait" will be reported.
It should be noted that if the frozen partitions are in this client, data
consumption will only be restored after unfreezing; the freezing operation will
not affect the consumption of other consumers in the same group, in another
words, if load balancing occurs, the frozen partitions will be allocated to
other consumers, other consumers can still continue to consume.
was (Author: gosonzhang):
!screenshot-1.png!
I understand that the problem with this requirement is that the pull request
can not specify the partition to pull, which causes the user to be unable to
perform fine control operations when it wants to suspend the consumption of a
certain partition.
In response to this problem, the plan is divided into two parts: in the current
stage, the plan is to be controlled on the SDK side to support the client to
call the API to freeze the local consumption of the specified partition; after
the subsequent support of the client partition allocation function, the user
can freely specify the consumption of the partition.
After the SDK is started, the business logic first obtains the partition
currently allocated to the partition and the consumption offset through
getCurConsumedPartitions(); when the user needs to freeze the consumption of
some partitions, the freeze setting is performed through freezePartitions(),
and the subsequent specified consumer group does not It is scheduled; when the
business needs to view the frozen partition set, the frozen partition is
obtained by calling getFrozenPartInfo(), and the frozen partition can only be
unfreeze operation through unfreezePartitions(), relAllFrozenPartitions(); if
all partitions are frozen, the push stops pulling and the pull request makes
the getMessage() call, and the error message "All partition are frozen to
consume, please unfreeze partition(s) or wait" will be reported.
It should be noted that if the frozen partitions are in this client, data
consumption will only be restored after unfreezing; the freezing operation will
not affect the consumption of other consumers in the same group, in another
words, if load balancing occurs, the frozen partitions will be allocated to
other consumers, other consumers can still continue to consume.
> In the pull mode, consumers support the suspension of consumption for a
> certain partition;
> ------------------------------------------------------------------------------------------
>
> Key: TUBEMQ-319
> URL: https://issues.apache.org/jira/browse/TUBEMQ-319
> Project: Apache TubeMQ
> Issue Type: New Feature
> Components: Client
> Reporter: carylu
> Assignee: Guocheng Zhang
> Priority: Major
> Attachments: screenshot-1.png
>
>
> In the pull mode, consumers support the suspension of consumption for a
> certain partition;
--
This message was sent by Atlassian Jira
(v8.3.4#803005)