1
votes

I'm writing a system using the Axon framework. One of my event handlers posts a command to a different microservice and I have implemented the retry function with exponential back-off to deal with the other service not being available.

I can see this working if I manually turn off the receiving microservice on watch the logs etc, but is there a more formal way of automating this testing?

1
Welcome to SO. Could you describe your problem in more detail, please? E.g. by adding code or commands you've tried to solve it on your own. Please have also a look to the Help Center, especially regarding asking and minimal examples. Thanks. - CKE
Sorry, I did worry it was a bit too generic. There's not much online about Axon so I was just looking for maybe a link to an article or something. I'll try posting in some Axon google groups. Thanks - Christopher Hopkins

1 Answers

0
votes

The framework does not provide a generic way to test this functionality. Thus, you will have to resort to some form of integration testing.

In there, you could embed the service you're going to call with the retry mechanism, shut it down during tests and see a number of retries occurring by catching the dispatched commands.

Axon Framework only provides dedicated test fixtures for Aggregates and Sagas at this stage (speaking about framework version 4.2).

Concluding, it is thus up to you what approach for testing you take in here.