cqrs

Axon - Cannot emit query update in different microservice

我只是一个虾纸丫 提交于 2021-02-11 07:14:07
问题 I'm bothering with situation when I want to emit query update via queryUpdateEmitter but in different module (microservice). I have application built upon microservices and both are connected to the same Axon Server. First service creates subscriptionQuery, and sends some commands. After a while (through few commands and events) second service handles some event, and emits update for firstly subscribed query. Unfortunately it seems like this emit doesn't get to subscriber. Queries are exactly

Axon - Cannot emit query update in different microservice

不羁的心 提交于 2021-02-11 07:13:24
问题 I'm bothering with situation when I want to emit query update via queryUpdateEmitter but in different module (microservice). I have application built upon microservices and both are connected to the same Axon Server. First service creates subscriptionQuery, and sends some commands. After a while (through few commands and events) second service handles some event, and emits update for firstly subscribed query. Unfortunately it seems like this emit doesn't get to subscriber. Queries are exactly

DDD - aggregate root identity usage across bounded context bounderies

谁说胖子不能爱 提交于 2021-02-09 11:52:43
问题 One suggested way to model entity identities in a domain model is to create value objects instead of using primitive types (f.e. in C#): public class CustomerId { public long Id { get; set; } } In my opinion this classes should be used throughout the whole application and not only in the domain model. Together with commands and events they can define a service contract for a bounded context. Now in an message/event driven architecture with multiple bounded contexts and each having a separate

Migrate legacy database to cqrs/event sourcing view

风流意气都作罢 提交于 2021-02-07 10:37:18
问题 We got old legacy application with complex business logic which we need to rewrite. We consider to use cqrs and event sourcing. But it's not clear how to migrate data from the old database. Probable we need migrate it to the read database only, as we can't reproduce all the events to populate event store. But we atleast need to create some initial records in event store for each aggregate, like AggregateCreated ? Or we need write a scripts and to use all the commands one by one to recreate

Automatically scale Axon's tracking event processors

大城市里の小女人 提交于 2021-02-07 09:13:52
问题 I am using Axon framework 4.0.3 with Spring Boot to have event sourcing, and have one tracking processor which is configured to have multiple segments/threads to process events concurrently: axon.eventhandling.processors[my_processor].initial-segment-count = 6 axon.eventhandling.processors[my_processor].thread-count = 3 It is meant to have 2 nodes of my_processor using 3 threads each. However, the problem with this solution is that it's not scalable. I have to know from the very beginning how

Automatically scale Axon's tracking event processors

余生长醉 提交于 2021-02-07 09:13:07
问题 I am using Axon framework 4.0.3 with Spring Boot to have event sourcing, and have one tracking processor which is configured to have multiple segments/threads to process events concurrently: axon.eventhandling.processors[my_processor].initial-segment-count = 6 axon.eventhandling.processors[my_processor].thread-count = 3 It is meant to have 2 nodes of my_processor using 3 threads each. However, the problem with this solution is that it's not scalable. I have to know from the very beginning how

Axon Replay TrackingEvent related to some “aggregateIdentifier” using Axon 4

眉间皱痕 提交于 2021-02-07 04:32:49
问题 We are using CQRS and Event Sourcing using Axon 4. We have the following scenario. Domain Book Action- Create new Book into DB using the Axon CRQS and event sourcing flow (Command - Aggregate - Event) Action- Update the already created Book into DB using the Axon CRQS and event sourcing flow (Command - Aggregate - Event) In the Axon event store this two commands explained above (createCommand and updateCommand) have the same "aggregateIdentifier" id, they are in the same Aggregate tree,

Axon Event Published Multiple Times Over EventBus

别等时光非礼了梦想. 提交于 2021-01-29 21:51:01
问题 Just want to confirm the intended behavior of Axon, versus what I’m seeing in my application. We have a customized Kafka publisher integrated with the Axon framework, as well as, a custom Cassandra-backed event store. The issue I’m seeing is as follows: (1) I publish a command (e.g. CreateServiceCommand) which hits the constructor of the ServiceAggregate, and then (2) A ServiceCreatedEvent is applied to the aggregate. (3) We see the domain event persisted in the backend and published over the

Using ModelState Outside of a Controller

妖精的绣舞 提交于 2021-01-29 08:20:37
问题 I'm working on moving my API logic in my PATCH endpoint to a Mediatr Command. When applying my patch document, I usually check the model state like below. Normally, I'm doing this from a controller so there is no issue, but when moving this into a RequestHandler, I no longer have access to the model state property since I'm outside of the controller. How would you recommend going about this? Here is the model state logic I'd like to use outside of the controller:

Primary key in an Azure SQL database

妖精的绣舞 提交于 2021-01-02 08:13:10
问题 I'm working on a distributed system that uses CQRS and DDD principles. Based on that I decided that the primary keys of my entities should be guids, which are generated by my domain (and not by the database). I have been reading about guids as primary keys. However, it seems that some of the best practices are not valid anymore if applied to Azure SQL database. Sequential guids are nice if you use an on premise SQL server machine - the sequential guids that are generated will always be unique