-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow AxonServerEventStore to utilize FilteringEventStorageEngine #322
Comments
Thanks for filing this issue with us, @bsanders1979! The behavior would essentially be the same. I whipped up the following in an Intellij scratch, but haven't ran it. class FilteringEventUpcaster implements EventUpcaster {
private final List<String> eventsToSkip;
FilteringEventUpcaster(List<String> eventsToSkip) {
this.eventsToSkip = eventsToSkip;
}
@Override
public Stream<IntermediateEventRepresentation> upcast(
Stream<IntermediateEventRepresentation> intermediateRepresentations
) {
return intermediateRepresentations.filter(
representation -> !eventsToSkip.contains(representation.getType().getName())
);
}
} Would you mind giving this a try as a solution? |
Hey Steven, Thanks, |
Hey Steven, Have a good day! PS: I just wanted to clarify that I'm using 4.5.15 of axon-server-connector |
You are entirely right, @bsanders1979, my apologies. This makes your request pretty viable as an introduction, as there's no straightforward workaround apart from making your own build of Axon Framework. That said, I think we are dealing with a feature for the Axon Framework repository instead of the Axon Server Connector Java project. Does that make sense to you, @bsanders1979? Now, let quote two sentences from you in my reply:
I assume this means you're also on an old version of Axon Framework, right?
That's awesome news! Happy to have you use Axon's stuff :-) |
np. Can't say I'm not guilty of doing the same thing. 😆 Yeah, our monolith has to use 4.5 as trying to go any higher causes some errors. I want to upgrade the stack for the monolith, but it's kind of a tall order, so it will require more effort in terms of coding and testing. I'm including my config class for reference.
|
The fact you're on 4.5 is kind of a bummer to get you this enhancement ASAP. So, as proposed before, I can move this issue to the Axon Framework repository where it would allow impact on construction of the For the time being, if you need the filtering going forward, your best bet is to copy the |
Alright, I really appreciate you looking into this. As luck would have it, I was told yesterday that I can start looking into upgrading our stack very soon. I was able to compile 4.5 from the CLI, so I can probably slap a simple fix in there in the meantime. Have a good one. ✌️ |
That's great news, @bsanders1979! |
Hey Steven, |
Enhancement Description
I would like to be able to prevent some events from being published to the event store. Previously, our application was not connected to an event store, so this issue wasn't prevalent.
Current Behaviour
All events are published to event store
Wanted Behaviour
I would like to be able to prevent certain events from being published.
I suggest the following enhancement for AxonServerEventStore.Builder
Possible Workarounds
No known workarounds
The text was updated successfully, but these errors were encountered: