(Answer written for v3.0.0 of EventBus).
As far as I can tell, no event will be passed to the subscription method when it registers in this scenario.
When a new subscription method is processed it is checked to see whether or not it was annotated with sticky = true
. EventBus then iterates over all events previously posted using postSticky
and delivers a saved sticky event if appropriate (i.e. if an event of the correct Java type is found).
In your particular scenario, no sticky event of the appropriate type will be found during the iteration phase, so nothing will be delivered to the subscription method when it registers despite the sticky = true
annotation. The method should still receive all events posted after it registers.
If you want to double-check my parsing of the EventBus code, it should be quick to put together a small sample app that tests your scenario in isolation.
Hope that helps!