Morgan
Morgan

Reputation: 313

Is there a way to know when the Axon Framework is 'ready'

I'm working on an application using the axon framework and spring boot, and I'm triggering 'commands' before axon is ready to handle them, causing a "NoHandlerForCommandException".

Is there something i can use to know when axon is ready, instead of just catching the exception and repeating the attempt later?

Upvotes: 2

Views: 111

Answers (1)

Steven
Steven

Reputation: 7275

Sadly, at this point (thus Axon version 4.0) there is no triggering mechanism which tells you when all the (Command, Event, and Query) handlers have been registered to the (Command, Event, and Query) buses. I thought there was an issue for this on the backlog already, but apparently there wasn't. Just did create that though, under #880.

For now though, the pragmatic solution you've taken, thus catching the exception, is sadly the simplest thing you can do. Stay tuned on the ticket for it's resolution.

Upvotes: 3

Related Questions