This configuration order is indeed the reason why a Query Handler is not subscribed to the QueryBus yet whilst you’re already issuing the replay.
We have plans to be a little stricter on the configuration ordering of all the infrastructure components; I can however not give you a time frame on when this will be resolved.
To solve the problem you have though, I’d like to suggest that you leverage the Replay API as has been introduced into Axon 3.3.
Although this is an assumption from my part, I assume that you’re starting a replay by throwing away the Tracking Token.
This will issue a replay, but in a manor that the framework cannot deduce whether you’re performing a replay or simply started the application for the first time.
Taking control over this provides several benefits, like allowing the use of the @ResetHandler annotated function or the @AllowReplay annotation to ignore some event handling functions.
Additionally, opening up that API for yourself gives you the control to start the replay once your application is correctly started up.
If you feel this suggestion does not correctly resolve the problem you’re having, as the ordering is of the utmost importance on start up, I’d like to ask you to add an issue to GitHub.
This will serve as a helpful means for the development team to discuss the problem/suggestion at hand.
Hope this helps you out Bob!