On commit send / publish messages

115 views
Skip to first unread message

Gert Jansen van Rensburg

unread,
May 19, 2016, 8:32:46 AM5/19/16
to masstransit-discuss
Curious does masstransit have something that would only send/publish messages if the consumer / handler executes successfully? like post commit send / publish all messages.

I have seen the Transaction middleware, a possible way would be to add function calls to a queue and on commit flush the queue.

Hope this makes sense :)

Chris Patterson

unread,
May 19, 2016, 11:54:48 AM5/19/16
to masstrans...@googlegroups.com
endpointConfigurator.UseInMemoryOutbox();

This will defer send/publish until after the consumer completes successfully. It's not durable, but it's an easy implementation and the message won't be acknowledged unless the publish/sends are successful. It doesn't take place in a transaction, so there is a slim chance of leakage, but I haven't looked at making a durable one.



--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/75d02d4d-efed-4fa3-9a36-7511d2eab3f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gert Jansen van Rensburg

unread,
May 19, 2016, 8:21:44 PM5/19/16
to masstrans...@googlegroups.com
Awesome thanks

--
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/y8E_Dcbz9Zk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages