event-store

Why is my command event string field being retrieved as null

泄露秘密 提交于 2019-12-11 07:26:58
问题 I am writing my first EventStore test app, I am re-hydrating my object from a stream, and whilst it gets the numberSold correctly, the title is null, and I don't understand why - the command when retrieved from the stream has the title set as null but I am sure it is being written OK. Can a fresh pair of eyes see what I am doing wrong? private static void Main() { using (store = WireupEventStore()) { var newBook = new Book("my book", 0); newBook.ChangeBookName("renamed book"); newBook

NServicebus publishing event - recieves empty message

天大地大妈咪最大 提交于 2019-12-11 04:24:01
问题 I keep recieving the following message from my denormalizer host after publishing an event in my domain: 2011-07-22 14:18:32,374 [Worker.5] WARN NServiceBus.Unicast.UnicastBus [(null)] <(null)> - Received an empty message - ignoring. I am just doing this with jolivers eventstore: return Wireup.Init() .UsingRavenPersistence("EventStore", new DocumentObjectSerializer()) .UsingAsynchronousDispatcher() .PublishTo(new DelegateMessagePublisher(c => container.Resolve<IPublishMessages>().Publish(c)))

CQRS/Event sourcing project structure

南笙酒味 提交于 2019-12-09 21:11:34
问题 I have my first CQRS project which uses event sourcing and I was wondering if this type of project should be structured in a different way in Visual studio compared to other projects that involve multiple tiers? For example, in the pastt projects created had layers such as Remoting, App services, domain etc and it was clear each layer/assembly touched the one below it. These assemblies seemed to do a lot and using a tool like NDepend did say much about the structure of the project. However,

EventStore only showing hexadecimal string in Payload column

房东的猫 提交于 2019-12-08 01:55:16
问题 As far as I can tell I should have JSON showing in Payload column in my SQL database Commits table, however I have a long hexadecimal string. My wireup code is as per the sample with the following edits: private static IStoreEvents WireupEventStore() { return Wireup.Init() .LogToOutputWindow() .UsingInMemoryPersistence() .UsingSqlPersistence("EventStore") // Connection string is in app.config .WithDialect(new MsSqlDialect()) .EnlistInAmbientTransaction() // two-phase commit

DDD, Event store, UI

徘徊边缘 提交于 2019-12-05 14:38:44
I have a project which is designed or at least should be according to the well known DDD principles. Back - DDD + CQRS + Event Store UI - ngrx/store I have a lot of questions to ask about it but for now I will stick to these two: How should the UI store be updated after a single Command/Action is executed ? a) subscribe to response.ok b) listen to domain events c) trigger a generic event holding the created/updated/removed object ? Is it a good idea to transfer the whole aggregate root dto with all its entities in each command / event or it is better to have more granular commands / events for

JOliver EventStore - How to access all stored events?

故事扮演 提交于 2019-12-04 12:42:49
How can I access all stored events in the EventStore to rebuild my read models? A method called GetFrom is mentioned at question J Oliver EventStore V2.0 questions , but I cannot find this method on the interface "IStoreEvents" which is returned from Wireup. Jonathan Oliver That method is a part of the IPersistStreams interface and not the IStoreEvents interface. The API needs to be refined slightly to accommodate that. I have just added a method to IStoreEvents called GetFrom(DateTime started) that returns IEnumerable<Commit> : https://github.com/joliver/EventStore/commit

What is causing EventStore to throw ConcurrencyException so easily?

半腔热情 提交于 2019-12-04 11:50:19
Using JOliver EventStore 3.0, and just getting started with simple samples. I have a simple pub/sub CQRS implementation using NServiceBus. A client sends commands on the bus, a domain server recieves and processes the commands and stores events to the eventstore, which are then published on the bus by the eventstore's dispatcher. a read-model server then subscribes to those events to update the read-model. Nothing fancy, pretty much by-the-book. It is working, but just in simple tests I am getting lots of concurrency exceptions (intermittantly) on the domain server when the event is stored to

Event-sourcing: when (and not) should I use Message Queue?

自古美人都是妖i 提交于 2019-12-03 10:42:49
问题 I am building a project from scratch using event-sourcing with Java and Cassandra. My apps we be based on microservices and in some use cases information will be processed asynchronously. I was wondering what part a Message Queue (such as Rabbit, Active MQ Artemis, Kafka, etc) would play to improve the technology stack in this environment and if I understand the scenarios if I won't use it. 回答1: I would start with separating messaging infrastructure like RabbitMQ from event streaming/storing

User Auth in EventSourcing applications

徘徊边缘 提交于 2019-12-03 07:14:15
问题 I'm looking into crafting an app with DDD+CQRS+EventSourcing, and I have some trouble figuring out how to do user auth. Users are intrinsically part of my domain, as they are responsible for clients. I'm using ASP.NET MVC 4, and I was looking to just use the SimpleMembership. Since logging in and authorising users is a synchronous operation, how is this tackled in an eventually consistent architecture? Will I have to roll my own auth system where I keep denormalized auth tables on the read

Handling out of order events in CQRS read side

早过忘川 提交于 2019-11-30 18:29:41
I've read this nice post from Jonathan Oliver about handling out of order events. http://blog.jonathanoliver.com/cqrs-out-of-sequence-messages-and-read-models/ The solution that we use is to dequeue a message and to place it in a “holding table” until all messages with a previous sequence are received. When all previous messages have been received we take all messages out of the holding table and run them in sequence through the appropriate handlers. Once all handlers have been executed successfully, we remove the messages from the holding table and commit the updates to the read models. This