-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Akka Should Allow Separate Read and Write Event Adapter Bindings #4567
Comments
You can only have multiple event adapters if they're of type Now, as to why it's not allow to have multiple
|
Normally I would agree, but our issue is we're using a 3rd party service for our In the documentation for Event Adapters it says that we can configure an array of 1 read and 1 write |
Hmmmm.... I think the rules are that only a single type of binding can be used for an |
I updated my unit test to match our use case. We have 3 main aggregates, and each aggregate has a handful of events that will need to be upcast when we read from the journal. In our use case, because we're using Akkatecture all of our events are coming from the journal as the same type, so we can only have 1 adapter binding in the hocon config. Each aggregate needs it's own |
@Aaronontheweb Is there an update to this issue? |
Taking a look at it now - very, very sorry for the delay. Had a lot of stuff going on. |
Looks good to me - just approved your PR |
Awesome, thank you! |
We are currently using Akka.Net and another 3rd party library (Akkatecture) in our application. Akkatecture has their own class that inherits from IReadEventAdapter that is used for event upgrading, and we have built our own IWriteEventAdapter that will tag our events according to our specifications. We made changes to some of our events, so we need to use IReadEventAdapter in order to upgrade those events to the new version, as well as use our own event tagging IWriteEventAdapter. We're not able to bind multiple read event adapters and a single write adapter, to a single event type.
Example/Reproduce (Taken from .\src\core\Akka.Persistence.Tests\Journal\MemoryEventAdaptersSpec.cs):
In the constructor of MemoryEventAdaptersSpec, I add this configuration to the in-line hocon file:
And then below, I add this class:
I should expect that the Event Adapters that are bound to ReadWriteEvent would be an instance of the reader event adapter and the write event adapters that are defined in the test class constructor. However, the writer adapter isn't being used, but a NoopWriteEventAdapter is being set instead.
Proposed Solution:
I will have a pull request out shortly that will add another event adapter that will accept multiple read event adapters and a single write event adapter.
The text was updated successfully, but these errors were encountered: