You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The order creation process is saving orders to the database in a PENDING state, but the event publishing (using the Outbox Pattern) is happening asynchronously and outside of the transaction. This introduces a risk where events may fail to be published, leading to an inconsistency between the order state and the event state, causing potential data integrity issues. Actually am not found sync publish method. and async publish method is swallow exception. Just want to know how can i handle this scenario. because eventual.io already use outbox pattern i don't want use retry maybe in my application code
@Transactional public Order createOrder(OrderDetails orderDetails) { ResultWithEvents<Order> orderWithEvents = Order.createOrder(orderDetails); Order order = orderWithEvents.result; orderRepository.save(order); domainEventPublisher.publish(Order.class, order.getId(), orderWithEvents.events); return order; }
The text was updated successfully, but these errors were encountered:
The order creation process is saving orders to the database in a PENDING state, but the event publishing (using the Outbox Pattern) is happening asynchronously and outside of the transaction. This introduces a risk where events may fail to be published, leading to an inconsistency between the order state and the event state, causing potential data integrity issues. Actually am not found sync publish method. and async publish method is swallow exception. Just want to know how can i handle this scenario. because eventual.io already use outbox pattern i don't want use retry maybe in my application code
@Transactional public Order createOrder(OrderDetails orderDetails) { ResultWithEvents<Order> orderWithEvents = Order.createOrder(orderDetails); Order order = orderWithEvents.result; orderRepository.save(order); domainEventPublisher.publish(Order.class, order.getId(), orderWithEvents.events); return order; }
The text was updated successfully, but these errors were encountered: