cfg.ReceiveEndpoint(host, SendActivities.SendFaxActivity, e =>
{
e.EnableExpress = false;
e.EnablePartitioning = true;
var compUri = new Uri(serviceBusBaseUri, SendActivities.SendFaxActivity_Compensate);
e.ExecuteActivityHost<SendFaxActivity, SendFaxArguments>(compUri, context.Resolve<ILifetimeScope>());
});
cfg.ReceiveEndpoint(host, SendActivities.SendFaxActivity_Compensate, e =>
{
e.EnableExpress = false;
e.EnablePartitioning = true;
e.CompensateActivityHost<SendFaxActivity, ActivityMeta>(context.Resolve<ILifetimeScope>(), x => x.UseRetry(y => y.Exponential(3, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5))));
});builder.Register(context =>
{
var busControl = Bus.Factory.CreateUsingAzureServiceBus(cfg =>
{
var host = cfg.Host(ConnectionString(), c => { });
cfg.EnableExpress = false;
cfg.UseJsonSerializer();
cfg.UseInMemoryOutbox();
cfg.ReceiveEndpoint(host, SendWorkflowStateMachine.QueueName, e =>
{
e.UseInMemoryOutbox();
e.PrefetchCount = 8;
e.UseConcurrencyLimit(1);
e.StateMachineSaga(context.Resolve<SendWorkflowStateMachine>(), context.Resolve<ILifetimeScope>(), x =>
{
});
});
cfg.ReceiveEndpoint(host, ReceiveWorkflowStateMachine.QueueName, e =>
{
cfg.EnableExpress = false;
cfg.UseJsonSerializer();
cfg.UseInMemoryOutbox();
e.StateMachineSaga(context.Resolve<ReceiveWorkflowStateMachine>(), context.Resolve<ILifetimeScope>(),
x =>
{
});
});
});
return busControl;
})
.SingleInstance()
.As<IBusControl>()
.As<IBus>();Code would really help but first.
Are all the state machine services using the same queue?
Are all activities on unique queues?
Are any activities adding a log entry with a compensation address that was specified when the execute activity host was configured?
__Chris Patterson
From: masstrans...@googlegroups.com <masstrans...@googlegroups.com> on behalf of ryan....@royaljay.net <ryan....@royaljay.net>
Sent: Saturday, October 7, 2017 4:41:51 PM
To: masstransit-discuss
Subject: [masstransit-discuss] Activities duplicated when running 2 instances of StateMachine
Hoping this is an easy one as I am still not 100% sure what is going on here. I have a routingslip workflow that reports events and state to a SagaStateMachine.--
Behind the scenes, the routingslip activities are hosted in 3 different windows services spread over multiple hosts.The StateMachine is hosted on it's own windows service on 3 hosts.
There are 2 things that have recently started happening and I am not sure if they're related:
1. When multiple StateMachine service processes are running, activities get duplicated (run multiple times per workflow)2. routing_slip_state_skipped queue is filling with compensation events, but we don't compensate any activities nor do we listen/handle that event in the state machine.
Any direction and help is greatly appreciated.
Thanks,
Ryan
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-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsubscribe...@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/a4aa2a5d-44ba-4614-a772-1fbcfa35ab5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/47d42b07-33da-4570-ad4d-8d084a7f913a%40googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
builder.AddSubscription(_endpointProvider.GetEndpointAddress(SendWorkflowStateMachine.QueueName), RoutingSlipEvents.All);return Task.Run(() => context.Compensated());To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@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/a4aa2a5d-44ba-4614-a772-1fbcfa35ab5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.