event-sourcing

Occasionally connected CQRS system

扶醉桌前 提交于 2019-12-18 12:19:59
问题 Problem: Two employees (A & B) go off-line at the same time while editing customer #123, say version #20, and while off-line continue making changes... Scenarios: 1 - The two employees edit customer #123 and make changes to one or more identical attributes. 2 - The two employees edit customer #123 but DO NOT make the same changes (they cross each other without touching). ... they then both come back on-line, first employee A appends, thereby changing the customer to version #21, then employee

Design Commands And Events while Handling External partner with Axon 4

末鹿安然 提交于 2019-12-13 13:25:33
问题 This is a question related to designing command handling with Axon 4. Let say I've a domain that model the concept of a Payment . The actual payment will be done by an external Partner. I want to track it in my system via the following events: a Payment Request Was Issued followed by either Partner Agreed the Payment or Partner Declined the Payment . Every events issued by the command should be enrolled in the same database transaction. What would be the best practice to actually call my

When using MDA, should you differentiate between idempotent and non-idempotent event handlers?

て烟熏妆下的殇ゞ 提交于 2019-12-13 00:57:43
问题 The question assumes the use of Event Sourcing. When rebuilding current state by replaying events, event handlers should be idempotent. For example, when a user successfully updates their username, a UsernameUpdated event might be emitted, the event containing a newUsername string property. When rebuilding current state, the appropriate event handler receives the UsernameUpdated event and sets the username property on the User object to the newUsername property of the UsernameUpdated event

Subscribe to category stream, event never appears in subscription client

十年热恋 提交于 2019-12-12 19:09:28
问题 Being a first time user of GetEventStore and having read the docs, I have an issue where events never appears on my subscription client. This is possible due to a configuration step I've missed. Having this console application client: public class EventStoreSubscriptionClient : ISubscriptionClient { private const string GroupName = "liner"; private const string StreamName = "$ce-happening"; private readonly IProvideEventStoreConnection _eventStoreConnection; private readonly UserCredentials

CQRS - Event replay for read side

a 夏天 提交于 2019-12-12 18:28:12
问题 I have read several blogs on CQRS and all of them explain that at write-side events are persisted on event store and upon a request, events are retrieved and replayed on aggregate. My question is why doesn't event replay on an aggregate is required at read side? 回答1: Because your read side doesn't use aggregates. Read side is implemented as projections which calculate the current state from the stream of events emited by aggregates and persist the current state in some pesistent store or in

Microservices Create Entity Implementation

让人想犯罪 __ 提交于 2019-12-12 17:11:55
问题 This is a follow-up question to my issue outlined here. The Gateway serves as an entry point to the application, to which every request from the client is made. The gateway then allocates the request to the responsible microservices and also handles authentication. In this case the gateway listens for HTTP POST /bok and notifies the Microservice A to create a book. Thus Microservice A ist responsible for managing and storing everything about the book entity. The following pseudo-code is a

Event sourcing with Kafka streams

戏子无情 提交于 2019-12-12 08:15:16
问题 I'm trying to implement a simple CQRS/event sourcing proof of concept on top of Kafka streams (as described in https://www.confluent.io/blog/event-sourcing-using-apache-kafka/) I have 4 basic parts: commands topic, which uses the aggregate ID as the key for sequential processing of commands per aggregate events topic, to which every change in aggregate state are published (again, key is the aggregate ID). This topic has a retention policy of "never delete" A KTable to reduce aggregate state

EventStore & RavenDB Persistence JsonReaderException

白昼怎懂夜的黑 提交于 2019-12-11 11:16:23
问题 Trying to wire up JOliver's EventStore with RavenDB and hit a snag. I created a new DB in Raven called RavenEventStore. The following is my wireup; return Wireup.Init() .UsingRavenPersistence("RavenEventStore") .UsingAsynchronousDispatchScheduler() .DispatchTo(new DelegateMessageDispatcher(DispatchCommit)) .Build(); When the Wireup.Init() is called, this exception is occuring on the RavenDb side; Url: "/indexes/RavenCommitByDate" Newtonsoft.Json.JsonReaderException: Unexpected character

Does Wolkenkit event-sourcing have a scheduler?

久未见 提交于 2019-12-11 09:03:19
问题 I'd like to schedule time-triggered actions to fire off events at both intervals and specific times. This would be useful if I needed to say, change the aggregate state with some events like meetingStarted and meetingEnded based on something like a start_at and end_at for a room-booking service. 回答1: Right now, wolkenkit does not have a scheduler like this. Adding this is on the roadmap, but currently it's not yet implemented. Please note that I am one of the developers of wolkenkit, so

How to enable Parallel Processing for a processing group using the Axon API?

本小妞迷上赌 提交于 2019-12-11 07:28:07
问题 I'm trying to enable parallel processing on one of my processing group (a Saga to be exact), I followed the the Axon Reference and I ended up with the following @Autowired public void configureProcessor(Configurer configurer) { configurer.eventProcessing().registerTrackingEventProcessor("NameOfMySagaProcessor", org.axonframework.config.Configuration::eventStore, c -> c.getComponent( TrackingEventProcessorConfiguration.class, () -> TrackingEventProcessorConfiguration.forParallelProcessing(1)