Replies: 1 comment
-
Hi @nyh1030 Looks like your OrderDecider and OrderSaga generic types don't match.
Additionally, I don't see a need for a dedicated Payment Decider/View. It could be good enough that the concept of Payment is modeled/implemented as a simple Enum/Status attribute in your OrderDecider. In that case, OrderDecider should have two additional commands: MarkOrderAsPaid, and MarkOrderAsNotPaid, for example. Best, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello.
I'm having a hard time implementing
Aggregate
andMaterializedView
should be set up in this case.Before I explain the issue, here is my situation.
I have an Aggregate with only one
Order
.OrderDecider
, andOrderView
.OrderDecider
is composed ofOrderCommand
,OrderEvent
, and inherits and implementsCommand
andEvent
.I also added a Saga for external integration, which I'll call
PaymentSaga
for simplicity.PaymentCommand
andPaymentEvent
also inherit fromCommand
andEvent
inherit and implement them.My issue : Problem setting
Aggregate
,MaterizlizedView
when there is only one Aggregate inmonolith
method.Details :
The example
combines
Order and Restaurant to create a Payment.and processed as
Command
andEvent
,In my situation, I only have Order, so I can't process it with
.combine()
.In
OrderDecider
,OrderView
.OrderCommand
, andOrderEvent
, I can set them to handleCommand
andEvent
instead.But then I need to handle
PaymentCommand
andPamentEvent
as well.In
EventStream
andMaterializedViewStateRepositoryImpl
, I want to keep them to handle the entire Event.without
.combine()
Aggregate, MaterizlizedView for setting up a Is there a good way?I will summarize the question as mine is too long.
1 Aggregate, 1 Third Party Saga
in the case of Command, Event type, and
Aggregate, MaterializedView in the case of a Third Party Saga.
[Note]
I explicitly specified the co-variance of generic types in Kotlin, but it didn't solve the whole problem.
Example.)
And additionally
I was wondering if I don't need to implement Decider and View for
Payment(the third party)
separately.Beta Was this translation helpful? Give feedback.
All reactions