Middleware filter for managing the lifecycle and execution of compensation activities in distributed transactions. Use it to handle rollback logic in MassTransit sagas.
// Source: https://github.com/MassTransit/MassTransit | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
namespace MassTransit.Middleware
{
using System.Threading.Tasks;
public class CompensateActivityFactoryFilter<TActivity, TLog> :
IFilter<CompensateContext<TLog>>
where TActivity : class, ICompensateActivity<TLog>
where TLog : class
{
readonly ICompensateActivityFactory<TActivity, TLog> _factory;
readonly IPipe<CompensateActivityContext<TActivity, TLog>> _pipe;
public CompensateActivityFactoryFilter(ICompensateActivityFactory<TActivity, TLog> factory, IPipe<CompensateActivityContext<TActivity, TLog>> pipe)
{
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key