Pub/Sub is a powerful building block in a backend application. It's often used for building event-driven backend applications.
Pub/Sub can be used...
For further actions, you may consider blocking this person and/or reporting abuse
What about the double write pattern problem here?
Does you Encore client take care of using sth like the outbox pattern? Because here if the message sending fails you will rollback your database tx and send an error to the user, but the message sending works but your db commit fails you get inconsistency
Hey @rod2j - great point! There is indeed a package for implementing the outbox pattern. See the docs here: encore.dev/docs/primitives/pubsub/...
Leveraging Pub/Sub in event-driven Go backends facilitates seamless tngofullform communication between services, promoting scalability and decoupling. With publishers broadcasting events and subscribers reacting accordingly, this approach fosters a more responsive and resilient architecture. Integrating Pub/Sub enables asynchronous processing, enhancing the efficiency and adaptability of the backend system.