Stateless and Stateful Message Handler

Hi All,

I watch @udidahan the presentation on youtube. About sagas and domain model. I think this one has already got covered also in the ADSD course.

But when i read this docs in particular docs

It got me confused as i thought everything is saga. Because basically domain is stateful right? Regardless where we store it.

In NServiceBus we also have notion of stateless and stateful message handler (saga). I think every message handler is stateful. We need to fetch the domain object by unique Id, invoke some method then store it and publish some event.

So i think it’s not stateful then it should be called function…

Thought?

Cheers

Hi @DavidBoike @Dennis any suggestion on this one?

cc: @danielmarbach

poking all particular army :slight_smile:

I share @jbogard opinion on this topic, quoting Jimmy all over the place is a lifegoal of mine :slight_smile:

One major difference between a saga and a domain model/aggregate is that in a saga, it MUST be started by a message, and the state is private to the saga.

In a domain model, interactions could be synchronous or asynchronous, it could be created by any kind of interaction, and the state is not necessarily private, and is very often not.

One reason why we also wrote this article

Regards
Daniel

Jimmy fans boy? :smile:

i can’t blame you… I also one of them lol

Thanks btw. We are looking into NServiceBus right now. Seems NSB is well placed on the business event and business facing kind of stuff.

So is that mean some kind of realtime analytics like fraud detection is not appropriate using NSB? Is that stream processing need to be processed in other engine? I see @udidahan presentation about rules engine, search engine etc… Seems that one is required some kind of batch and streaming processing. So Analytics would be in IT/Ops right?

Cheers

Did you like how I said “One major difference” but then described two major differences?

Classic

1 Like