The message producer sends messages of all tags to the same topic. Messages are arranged in the queue in order and a message write point is maintained. When a group ID is started, it specifies the tags to be subscribed to and obtains the current consumption offset from the broker. The broker traverses messages in the queue from the consumption offset of the current group ID. If the tag of a message is consistent with the tag subscribed by the group ID, the broker delivers the message to the group ID. Otherwise, the broker skips this message.
As shown in the following figure, the consumption offset of the group ID moves forward. Messages with Tag2 and Tag3 are filtered out by the broker. The message with Tag1 is required by the group ID and will be delivered to the group ID.
Therefore, the accumulation amount you saw after choosingin the console is the unfiltered accumulation amount, which contains messages with all tags.