i came late to the messaging party so I am a little confused on this simple scenario. I have a website with a feedback form and when the user sends their feedback my business requirements state I need to persist the feedback for reporting purposes, send an email to the product manager, and send a thank you email to the sender.
now i see a few different options:
- The web server will persist the feedback (async database call) and publish a FeedbackCreated event on the bus.
- The web server will send a SendFeedback command on the bus and the end point will have a message handler that persists the feedback and publishes a FeedbackCreated event which will be handled by the same endpoint (or should i send two local messages for the email???)
- The web server will send a SendFeedback command on the bus and the end point will have a saga that kicks in and takes over.
So I guess I'm confused on if after the feedback is persisted to the database should i publish an event or send two messages(which will be handled locally)? please not the message do not have all the info for the email so additional information will need to be looked up.
thanks!