当调用EventBus.post(event),事件没有订阅者,则会封装成DeadEvent
public class DeadEventSubscriber {private static final Logger logger = Logger.getLogger(DeadEventSubscriber.class);public DeadEventSubscriber(EventBus eventBus) {eventBus.register(this);}@Subscribepublic void handleUnsubscribedEvent(DeadEvent deadEvent){logger.warn("No subscribers for "+deadEvent.getEvent());}
}