-
Contact DetailsVersion8.x On which operating system(s) are you experiencing the issue?Windows Using which broker(s) did you encounter the issue?Amazon SQS What are the steps required to reproduce the issue?1. Follow the setup instructions on the git repo
2. Run the MT.Saga.Outbox project to start the saga
3. Run the MT.All.In.One.Service to start publishing events
4. Note the behavior below:
I have a Saga state machine that receives events from Kafka and SNS. For that I configure an SQS bus with a Kafka Rider.
I'm trying to configure schedules in my state machine for 2 different scenarios. As a result of receiving an SNS event and as a result of receiving a Kafka event.
It works when the state machine is consuming an SNS event and sets up a schedule (the .Schedule call is commented in the repo code because I want to demonstrate the other scenario below):
During(Created,
When(ProductSold) // SNS Event
...
// This is Published to http://localhost:4566/000000000000/order-saga
.Schedule(OrderExpirationSchedule, context => context.Init<OrderExpired>(new { context.Data.OrderId }))
.TransitionTo(Sold),
...
During(Sold,
....
When(OrderExpired) // This is Consumed
.Finalize()
);
When I set the scheduler from consuming a Kafka event it doesn't work:
Initially(
When(OrderCreated) // Kafka Event
....
.Schedule(ProductSaleExpirationSchedule, context => context.Init<ProductFailedToSell>(new { context.Data.OrderId }))
.TransitionTo(Created)
...
During(Created,
When(ProductFailedToSell) // This is NOT Consumed, possibly trying to consume from /order-saga (not sure)
.Finalize() What is the expected behavior?
What actually happened?
Related log output, including any exceptionsNo response Link to repository that demonstrates/reproduces the issue |
Beta Was this translation helpful? Give feedback.
Answered by
phatboyg
May 14, 2024
Replies: 1 comment 2 replies
-
Have you reviewed the logs? You can't schedule messages on Kafka topic endpoints, so that's probably why it isn't working from Kafka. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The rider topic endpoint has no clue that you've configured the saga on SQS, and therefore has no way to know that you've configured any sort of message scheduling. It's a known limitation at this point, and I don't have a fix planned.