Comments (1)
The key is in the RemoteHandlingException
you receive. This signals you are using either the JGroups or Spring Cloud Extension to distribute your application.
Whenever you are in a distributed environment, you need to assume the scenario that not all instances are equal.
Differently put, some applications may have command handlers, others may not (in short, a heterogeneous system).
Due to this, there is a window of opportunity that the exception thrown one application X does not exist on application Y.
As such, Axon Framework defaults to protect everybody by assuming the exception is unknown, by wrapping it for you.
If you want some level of control over what the exception result is, your best step forward is to throw a dedicated CommandExecutionException
, wherein you set the details
field.
This field is intended to carry your "exceptional API," enabling you to have conscious exceptional communication between your nodes, instead of assuming the exceptional classes are present on All instances that will ever dispatch commands to said application.
Thus, your best bet is to catch the exception and transform it into a CommandExecutionException
with (if necessary) your own details in it.
Granted, Axon Framework could be able to capture the exceptions originating from itself to generate these details.
By the way, you can also check our reference guide on the subject, over here.
I will close this issue as resolved, as I think the predicament is sufficiently addressed.
If you feel differently, be sure to reach out! We're always open for reconsidering.
Lastly, I strongly recommend you upgrade to a more recent version of Axon Framework.
We are already at 4.9.0, with 4.9.1 coming out soon.
from axonframework.
Related Issues (20)
- Shutdown-Mechanism of DbSchedulerDeadlineManager HOT 12
- InfraConfiguration.springAxonConfigurer ignores ConfigurerModule.order() HOT 5
- TrackingEventProcessor does not start all threads in rare cases HOT 2
- ComponentLocator does not resolve beans from Spring Parent Context HOT 6
- Various issues when importing Axon in Eclipse HOT 6
- Behavioral change in 4.9 JpaEventStoreAutoConfiguration HOT 5
- Validate necessity of `ReflectionUtils#ensureAccessible(T)` and `ReflectionUtils#isAccessible(AccessibleObject)` HOT 2
- Axon Spring Boot Starter fails to connect to Axon Server on Spring Boot version 3.1.6+ HOT 6
- Unable to Catch AggregateDeletedException When Using CommandGateway HOT 1
- Allow prevention of `@QueryHandlers` when the Event Handling Component backing the query handler is Replaying HOT 2
- Support Synthetic Flows/Tests HOT 1
- When `EmbeddedEventStore` enables `optimizeEventConsumption` (default) it will cause a memory leak of `Node` sometimes HOT 4
- `@DisallowReplay` on a single Event Handling Components blocks replay of the entire `StreamingEventProcessor` HOT 2
- Weird state causing tracking processors to never advance HOT 20
- Add and enhance JavaDoc for the new Unit of Work
- the EventStorageEngine is not config HOT 7
- Table partitioning for event table HOT 4
- Contract Testing HOT 4
- Default `ReplayToken` leads to events not being handled when used with Disallow Replay API HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axonframework.