yaphetsglhf commented on issue #650:
URL:
https://github.com/apache/rocketmq-client-go/issues/650#issuecomment-832654742
> ```go
> type processQueue struct {
> cachedMsgCount int64
> cachedMsgSize int64
>
> msgCache *treemap.Map
> consumingMsgOrderlyTreeMap *treemap.Map
> }
> ```
>
> i think `cachedMsgCount` mean pulled msgCount ,now equal `msgCache.Size()
+ consumingMsgOrderlyTreeMap.Size()`, used by
>
>
https://github.com/apache/rocketmq-client-go/blob/dfa26d159f9f47cf38c8788dc3ae9443bad61e0d/consumer/push_consumer.go#L583
>
> first problem is #615 ,if consuming orderly and failed, the cachedMsgCount
will increase and can't consume any more.
> I send a pr to fix #616 ,but got another problem( #618 msg lost when
failed).
> so pr #619 make cachedMsgCount and msg both ok
as you said, `cachedMsgCount = msgCache.Size() +
consumingMsgOrderlyTreeMap.Size()`, if you put one message back to `msgCache`,
the cachedMsgCount should plus one at the same time. Or else, you just mean
the total amount of the `cachedMsgCount` should not change, but the message
will in both `msgCache` and `consumingMsgOrderlyTreeMap`, so it's not necessary
to increate the `cachedMsgCount`
--
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]