Hi everyone. Very excited to try and use axon as main billing platform as replacement to current.
Currently have some concerns due to project specifics.
At a high level view, there are lots of users that are charged by milliseconds interval.
Publishing axon command for each such event I believe is an overkill. But batching them for
too long is not acceptable either ( will be lag in current balance ). So I’ve tried to find a middle-ground here by using kafka
and storing all those micro charges there. Each minute I’m retrieving everything from it, batch and only then publish to axon.
Root aggregate in my case is a user, so when everything is consumed I have lots charge commands, one for each user.
Problem that concerns me is that not all of dispatched commands might be handled successfully by projection handlers.
Also I believe there might be some external problems(i.e network) saving those events to axon. In such cases I don’t wan’t
to commit kafka offsets, just rollback everything.
Found thread with similar problem: https://groups.google.com/forum/#!topic/axonframework/M8SlGXsUsjM
The way to address this problem there was to use BatchCommand and SpringTransactionManager.
Planning to try this out and see how it goes, but what bothers me is this solution looks hacky )
Probably I’m missing something and there is more elegant way to achieve what I’m after ?
Would be glad to hear any advices / thoughts. Thanks!