EventBus 粘性事件是否在订阅者方法上自动删除?

Are EventBus sticky events automatically removed on the subscriber method?

我正在使用 GreenRobot's EventBus version 3.0. And there's a section on the docs,它表示我们可以 post 粘性事件,并且要接收这些事件,我们必须像这样订阅:

@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public void onEvent(MessageEvent event) {
    // Do something with the message.
    // Is the event removed from the bus on this method?
}

所以,我的问题是:一旦订阅者收到粘性事件,它们是自动从总线上移除,还是我必须手动移除它们?

注意: 我知道我可以使用以下行在代码的任何其他位置手动删除它们:

EventBus.getDefault().removeStickyEvent(stickyEvent);

但我想知道我是否真的需要在订阅者方法中这样做。

它们会留在总线上,直到被明确删除。

不,它们没有被删除。

但是,如果您粘贴消息只是为了在有人阅读时将其删除,那么您所描述的就是一个队列。

粘性事件就像布告栏中的粘性帖子:它们会保留 "at top" 并被所有人查看一段时间。