Automatonymous and Fault<T>

608 views
Skip to first unread message

Joachim Rosskopf

unread,
Aug 3, 2013, 12:02:24 PM8/3/13
to masstrans...@googlegroups.com
Hey,

I'm using the Automatonymous.Masstransit integration. 

When during the processing of a Message of type T, which also is Correlated.By<Guid>, in the StateMachine an exception is thrown, I expected the framework to send a Fault<T, Guid> message. At least this was the case for the Magnum-state-machines as documented at [1].
I see, that the exception is handled in the Taskell-Method RunSynchronously, and the Faulted-Methods get called.
By debugging further into for example Masstransits Endpoint::Receive-method, I see that the message is received normally by Masstransit. In the message log there is just a 

Received Successfully: f6000000-f5dc-0090-5f4d-08d05e773004

There is no sign of any error/fault handling.

So my question is: 

- Is error/fault-handling implemented in Automatonymous?
- If yes, do I have to enable it? 
- If no, are there some workarounds to get this kind of behavoir?

Thank you!
---
Joachim 


Travis Smith

unread,
Aug 5, 2013, 1:42:32 PM8/5/13
to masstrans...@googlegroups.com
Automatonymous is all Chris, I haven't touched it. I'm still using Magnum Sagas everywhere. So he'll have to respond. You there Chris?

-Travis


--
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/c72d4f26-1161-4ac3-af93-79870edbd872%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chris Patterson

unread,
Aug 7, 2013, 12:19:11 PM8/7/13
to masstrans...@googlegroups.com
I should probably look more closely at this one, seems like an oversight/error on my part.


--

Joachim Rosskopf

unread,
Aug 7, 2013, 12:23:02 PM8/7/13
to masstrans...@googlegroups.com
If you give me a hint, where to look (perhaps the analogous stuff for the Magnum sagas, and the place where the Taskell tasks gets executed) I can have a look at it.
There also doesn't seem to be a testcase on it. There is also no reference on the MT Fault/Fault<> type from Automatonymous.

Thank you.
---
Joachim


Am Mittwoch, 7. August 2013 18:19:11 UTC+2 schrieb Chris Patterson:
I should probably look more closely at this one, seems like an oversight/error on my part.
On Sat, Aug 3, 2013 at 11:02 AM, Joachim Rosskopf <joachim....@gmail.com> wrote:
Hey,

I'm using the Automatonymous.Masstransit integration. 

When during the processing of a Message of type T, which also is Correlated.By<Guid>, in the StateMachine an exception is thrown, I expected the framework to send a Fault<T, Guid> message. At least this was the case for the Magnum-state-machines as documented at [1].
I see, that the exception is handled in the Taskell-Method RunSynchronously, and the Faulted-Methods get called.
By debugging further into for example Masstransits Endpoint::Receive-method, I see that the message is received normally by Masstransit. In the message log there is just a 

Received Successfully: f6000000-f5dc-0090-5f4d-08d05e773004

There is no sign of any error/fault handling.

So my question is: 

- Is error/fault-handling implemented in Automatonymous?
- If yes, do I have to enable it? 
- If no, are there some workarounds to get this kind of behavoir?

Thank you!
---
Joachim 


--
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.

Chris Patterson

unread,
Aug 7, 2013, 2:01:52 PM8/7/13
to masstrans...@googlegroups.com
They key is that if an exception occurs during the handling of a message by Automatonymous, it should be carried back up to the original consumer through the Task that was composed. So the Task that is returned, if faulted, that exception should be rethrown back so that the MT consumer code catches it -- allowing the retry logic to kick in.



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.

Joachim Rosskopf

unread,
Aug 10, 2013, 5:45:45 AM8/10/13
to masstrans...@googlegroups.com
Hey,

I had a look into that. It seems, that the reason why the exception is not propagated back to MT is simply, that the Exception property of the Task ran by Taskell is never checked.
The StackTrace where the Faulted<> method is called, looks something like this:

> Taskell.dll!Taskell.TaskUtil.RunSynchronously(System.Action action, System.Threading.CancellationToken cancellationToken) Zeile 86 C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute.AnonymousMethod__4() Zeile 56 + 0x20 Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Threading.Tasks.Task task, System.Func<System.Threading.Tasks.Task> continuationTask, System.Threading.CancellationToken cancellationToken, bool runSynchronously) Zeile 160 + 0xb Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Action continuation, bool runSynchronously) Zeile 56 + 0x7c Bytes C#
  Automatonymous.dll!Automatonymous.Activities.ActionActivity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand>.Automatonymous.Activity<TInstance,TData>.Execute(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Sales.Lib.Messages.UpdateAdresseCommand value) Zeile 63 + 0x2c Bytes C#
  Automatonymous.dll!Automatonymous.TaskCompositionExtensions.ComposeActivity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand>(Taskell.Composer composer, Automatonymous.Activity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand> activity, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Sales.Lib.Messages.UpdateAdresseCommand data, bool runSynchronously) Zeile 46 C#
  Automatonymous.dll!Automatonymous.Activities.DataConverterActivity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand>.Automatonymous.Activity<TInstance>.Execute<Sales.Lib.Messages.UpdateAdresseCommand>.AnonymousMethod__3() Zeile 53 + 0x90 Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Threading.Tasks.Task task, System.Func<System.Threading.Tasks.Task> continuationTask, System.Threading.CancellationToken cancellationToken, bool runSynchronously) Zeile 160 + 0xb Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Func<System.Threading.Tasks.Task> continuationTask, bool runSynchronously) Zeile 66 + 0x5f Bytes C#
  Automatonymous.dll!Automatonymous.Activities.DataConverterActivity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand>.Automatonymous.Activity<TInstance>.Execute<Sales.Lib.Messages.UpdateAdresseCommand>(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Sales.Lib.Messages.UpdateAdresseCommand value) Zeile 41 + 0x35 Bytes C#
  Automatonymous.dll!Automatonymous.Activities.EventActivityImpl<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Automatonymous.Activity<TInstance>.Execute<Sales.Lib.Messages.UpdateAdresseCommand>(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Sales.Lib.Messages.UpdateAdresseCommand value) Zeile 48 C#
  Automatonymous.dll!Automatonymous.Impl.StateImpl<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Automatonymous.State<TInstance>.Raise<Sales.Lib.Messages.UpdateAdresseCommand>.AnonymousMethod__9(Taskell.Composer c, Automatonymous.Activity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance> a, Sales.Service.Messaging.Adressen.AdressenUpdateInstance i) Zeile 74 + 0x80 Bytes C#
  Automatonymous.dll!Automatonymous.Impl.StateImpl<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Raise<Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand>>.AnonymousMethod__c() Zeile 127 + 0x6f Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Threading.Tasks.Task task, System.Func<System.Threading.Tasks.Task> continuationTask, System.Threading.CancellationToken cancellationToken, bool runSynchronously) Zeile 160 + 0xb Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Func<System.Threading.Tasks.Task> continuationTask, bool runSynchronously) Zeile 66 + 0x5f Bytes C#
  Automatonymous.dll!Automatonymous.Impl.StateImpl<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Raise<Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand>>(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand> event, System.Action<Taskell.Composer,Automatonymous.Activity<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>,Sales.Service.Messaging.Adressen.AdressenUpdateInstance> callback) Zeile 119 + 0x35 Bytes C#
  Automatonymous.dll!Automatonymous.Impl.StateImpl<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Automatonymous.State<TInstance>.Raise<Sales.Lib.Messages.UpdateAdresseCommand>(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand> event, Sales.Lib.Messages.UpdateAdresseCommand value) Zeile 75 C#
  Automatonymous.dll!Automatonymous.TaskCompositionExtensions.ComposeEvent<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand>(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Automatonymous.State<Sales.Service.Messaging.Adressen.AdressenUpdateInstance> state, Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand> event, Sales.Lib.Messages.UpdateAdresseCommand data, bool runSynchronously) Zeile 65 C#
  Automatonymous.dll!Automatonymous.AutomatonymousStateMachine<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Automatonymous.StateMachine<TInstance>.RaiseEvent<Sales.Lib.Messages.UpdateAdresseCommand>.AnonymousMethod__6() Zeile 105 + 0x6a Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Threading.Tasks.Task task, System.Func<System.Threading.Tasks.Task> continuationTask, System.Threading.CancellationToken cancellationToken, bool runSynchronously) Zeile 160 + 0xb Bytes C#
  Taskell.dll!Taskell.TaskComposer<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Execute(System.Func<System.Threading.Tasks.Task> continuationTask, bool runSynchronously) Zeile 66 + 0x5f Bytes C#
  Automatonymous.dll!Automatonymous.AutomatonymousStateMachine<Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.Automatonymous.StateMachine<TInstance>.RaiseEvent<Sales.Lib.Messages.UpdateAdresseCommand>(Taskell.Composer composer, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand> event, Sales.Lib.Messages.UpdateAdresseCommand data) Zeile 99 + 0x35 Bytes C#
  Automatonymous.dll!Automatonymous.StateMachineExtensions.RaiseEvent<Sales.Lib.Messages.UpdateAdresseCommand,Sales.Service.Messaging.Adressen.AdressenUpdateInstance>(Automatonymous.StateMachine<Sales.Service.Messaging.Adressen.AdressenUpdateInstance> stateMachine, Sales.Service.Messaging.Adressen.AdressenUpdateInstance instance, Automatonymous.Event<Sales.Lib.Messages.UpdateAdresseCommand> event, Sales.Lib.Messages.UpdateAdresseCommand data, System.Threading.CancellationToken cancellationToken) Zeile 143 C#
  Automatonymous.MassTransitIntegration.dll!Automatonymous.Saga.Pipeline.CorrelatedStateMachineMessageSink<Sales.Service.Messaging.Adressen.AdressenUpdateInstance,Sales.Lib.Messages.UpdateAdresseCommand>.GetHandlers.AnonymousMethod__4(MassTransit.IConsumeContext<Sales.Lib.Messages.UpdateAdresseCommand> x) Zeile 50 + 0xa0 Bytes C#
  MessageBus.Lib.dll!MessageBus.Lib.Hosting.Saga.OrmLiteSagaRepository<Sales.Service.Messaging.Adressen.AdressenUpdateSaga,Sales.Service.Messaging.Adressen.AdressenUpdateInstance>.CreateNewSagaInstance<Sales.Lib.Messages.UpdateAdresseCommand>.AnonymousMethod__4(MassTransit.IConsumeContext<Sales.Lib.Messages.UpdateAdresseCommand> x) Zeile 163 + 0xe Bytes C#
  MassTransit.dll!MassTransit.Pipeline.Sinks.InboundConvertMessageSink<Sales.Lib.Messages.UpdateAdresseCommand>.Enumerate.AnonymousMethod__1(MassTransit.IConsumeContext x) Zeile 40 + 0x17 Bytes C#
  MassTransit.dll!MassTransit.Context.ServiceBusReceiveContext.DeliverMessageToConsumers(MassTransit.IReceiveContext context) Zeile 162 + 0x1d Bytes C#
  MassTransit.dll!MassTransit.Transports.Endpoint.Receive.AnonymousMethod__6(MassTransit.IReceiveContext receiveContext) Zeile 310 C#
  MassTransit.Transports.RabbitMq.dll!MassTransit.Transports.RabbitMq.InboundRabbitMqTransport.Receive.AnonymousMethod__0(MassTransit.Transports.RabbitMq.RabbitMqConnection connection) Zeile 98 C#
  MassTransit.dll!MassTransit.Transports.ConnectionHandlerImpl<MassTransit.Transports.RabbitMq.RabbitMqConnection>.Use.AnonymousMethod__2() Zeile 91 + 0x17 Bytes C#
  MassTransit.dll!MassTransit.Transports.DefaultConnectionPolicy.Execute(System.Action callback) Zeile 42 + 0xb Bytes C#
  MassTransit.dll!MassTransit.Transports.ConnectionPolicyChainImpl.Next(System.Action callback) Zeile 50 Unknown
  MassTransit.dll!MassTransit.Transports.ConnectionPolicyChainImpl.Execute(System.Action callback) Zeile 55 C#
  MassTransit.dll!MassTransit.Transports.ConnectionHandlerImpl<MassTransit.Transports.RabbitMq.RabbitMqConnection>.Use(System.Action<MassTransit.Transports.RabbitMq.RabbitMqConnection> callback) Zeile 93 Unknown
  MassTransit.Transports.RabbitMq.dll!MassTransit.Transports.RabbitMq.InboundRabbitMqTransport.Receive(System.Func<MassTransit.IReceiveContext,System.Action<MassTransit.IReceiveContext>> lookupSinkChain, System.TimeSpan timeout) Zeile 124 C#
  MassTransit.dll!MassTransit.Transports.Transport.Receive(System.Func<MassTransit.IReceiveContext,System.Action<MassTransit.IReceiveContext>> callback, System.TimeSpan timeout) Zeile 59 C#
  MassTransit.dll!MassTransit.Transports.Endpoint.Receive(System.Func<MassTransit.IReceiveContext,System.Action<MassTransit.IReceiveContext>> receiver, System.TimeSpan timeout) Zeile 334 Unknown
  MassTransit.dll!MassTransit.Context.ServiceBusReceiveContext.ReceiveFromEndpoint() Zeile 91 + 0x4e Bytes Unknown
  MassTransit.dll!MassTransit.Threading.ThreadPoolConsumerPool.QueueReceiver.AnonymousMethod__8(object x) Zeile 180 + 0xe Bytes C#
  mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x3e Bytes
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0xa7 Bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x16 Bytes
  mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x60 Bytes
  mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x149 Bytes
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x5 Bytes
 
I now tried to get, how one should get the exception from the task composer and rethrow it in the activity. But I don't understand errors are intended to get handled in Taskell.
Any suggestions, where to get the Task.Exeption property and rethrow it?

Regards
---
Joachim
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsubscribe...@googlegroups.com.

--
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.

Chris Patterson

unread,
Aug 11, 2013, 10:25:37 PM8/11/13
to masstrans...@googlegroups.com
Found it, committing the fix to /develop for the next release of Automatonymous.


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.

Joachim Rosskopf

unread,
Aug 12, 2013, 1:04:07 AM8/12/13
to masstrans...@googlegroups.com
Thank you very much!

--
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.

Joachim Rosskopf

unread,
Aug 12, 2013, 12:55:11 PM8/12/13
to masstrans...@googlegroups.com
I patched my version, and now the exception seems to propagate back to masstransit. Very good!

I now see, that some retry is going on. But my Event, which is defined somehow like this:

public Event<Fault<UpdateAdresseCommand, Guid>> UpdateFailed { get; set; }

But this event never gets raised. 
Is it a wrong assumption, that this message get's called automatically?
Do I have to genereate a fault manually? How is this done in Automatonimous?

Regards
---
Joachim

Chris Patterson

unread,
Aug 12, 2013, 1:18:33 PM8/12/13
to masstrans...@googlegroups.com
Did you add a declaration of the event to the constructor of the state machine?

If so, try it as Event<Fault<UpdateAdresseCommand>> instead.


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.

Joachim Rosskopf

unread,
Aug 12, 2013, 2:24:18 PM8/12/13
to masstrans...@googlegroups.com
This is the constructor of my Saga:

private AdressenUpdateSaga()
{
    InstanceState(i => i.InternalState);

    State(() => Faulted);
    State(() => Updateing);

    Event(() => UpdateRequested);
    Event(() => UpdateFailed);
    Event(() => UpdateFinished);

    Initially(
        When(UpdateRequested)
            .TransitionTo(Updateing)
            .Then(InitializeInstance)
            .Then(ProcessUpdateCommand)
    );

    During(Updateing,
        When(UpdateFailed)
            .TransitionTo(Faulted)
            .Then(CaptureFault)
        ,
        When(UpdateFinished)
            .Finalize()
    );
}

And this are the states/event declarations

public State Faulted { get; set; }
public State Updateing { get; set; }

public Event<UpdateAdresseCommand> UpdateRequested { get; set; }
public Event<Fault<UpdateAdresseCommand, Guid>> UpdateFailed { get; set; }
public Event<UpdateOfAdresseHappenedEvent> UpdateFinished { get; set; }

If I add the Event<> declaration for the Fault-object without the Guid I get an error:

[MassTransit.ServiceContainer] - Failed to stop service: MassTransit.Diagnostics.Tracing.MessageTraceBusService
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei MassTransit.Diagnostics.Tracing.MessageTraceBusService.Stop() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Diagnostics\Tracing\MessageTraceBusService.cs:Zeile 83.
   bei MassTransit.ServiceContainer.Stop() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\ServiceContainer.cs:Zeile 94.
[MassTransit.ServiceContainer] - Failed to stop service: MassTransit.Diagnostics.Tracing.MessageTraceBusService
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei MassTransit.Diagnostics.Tracing.MessageTraceBusService.Stop() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Diagnostics\Tracing\MessageTraceBusService.cs:Zeile 83.
   bei MassTransit.ServiceContainer.Stop() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\ServiceContainer.cs:Zeile 94.
[ServiceHub.Hosting.SingleAppDomainServiceHubHost] - MassTransit.Exceptions.ConfigurationException: An exception was thrown during service bus creation ---> MassTransit.Exceptions.ConfigurationExcepti
on: Failed to create the bus service: SubscriptionBusService ---> MassTransit.Exceptions.ConfigurationException: Failed to create the state machine connector for Sales.Service.Messaging.Adressen.Adres
senUpdateInstance ---> System.NotSupportedException: No method to connect to event was found for MassTransit.Fault`1[[Sales.Lib.Messages.UpdateAdresseCommand, Sales.Lib, Version=1.0.0.0, Culture=neutr
al, PublicKeyToken=null]]
   bei Automatonymous.SubscriptionConnectors.StateMachineEventConnectorFactory`2.<Create>d__0.MoveNext() in d:\Projects\OpenSource\Automatonymous\src\MassTransit\Automatonymous.MassTransitIntegration\
Configuration\SubscriptionConnectors\StateMachineEventConnectorFactory.cs:Zeile 85.
   bei Automatonymous.SubscriptionConnectors.StateMachineConnector`1.<StateMachineEvents>d__12.MoveNext() in d:\Projects\OpenSource\Automatonymous\src\MassTransit\Automatonymous.MassTransitIntegration
\Configuration\SubscriptionConnectors\StateMachineConnector.cs:Zeile 94.
   bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bei System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bei Automatonymous.SubscriptionConnectors.StateMachineConnector`1..ctor(StateMachine`1 stateMachine, StateMachineSagaRepository`1 repository) in d:\Projects\OpenSource\Automatonymous\src\MassTransi
t\Automatonymous.MassTransitIntegration\Configuration\SubscriptionConnectors\StateMachineConnector.cs:Zeile 46.
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei Automatonymous.SubscriptionConnectors.StateMachineConnector`1..ctor(StateMachine`1 stateMachine, StateMachineSagaRepository`1 repository) in d:\Projects\OpenSource\Automatonymous\src\MassTransi
t\Automatonymous.MassTransitIntegration\Configuration\SubscriptionConnectors\StateMachineConnector.cs:Zeile 50.
   bei Automatonymous.SubscriptionBuilders.StateMachineSubscriptionBuilder`1..ctor(StateMachine`1 stateMachine, StateMachineSagaRepository`1 repository, ReferenceFactory referenceFactory) in d:\Projec
ts\OpenSource\Automatonymous\src\MassTransit\Automatonymous.MassTransitIntegration\Configuration\SubscriptionBuilders\StateMachineSubscriptionBuilder.cs:Zeile 33.
   bei Automatonymous.SubscriptionConfigurators.StateMachineSubscriptionConfiguratorImpl`1.Configure() in d:\Projects\OpenSource\Automatonymous\src\MassTransit\Automatonymous.MassTransitIntegration\Co
nfiguration\SubscriptionConfigurators\StateMachineSubscriptionConfiguratorImpl.cs:Zeile 46.
   bei MassTransit.SubscriptionConfigurators.SubscriptionBusServiceBuilderConfiguratorImpl.Configure(SubscriptionBusServiceBuilder builder) in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Co
nfiguration\SubscriptionConfigurators\SubscriptionBusServiceBuilderConfiguratorImpl.cs:Zeile 36.
   bei MassTransit.SubscriptionConfigurators.SubscriptionBusServiceConfiguratorImpl.Create(IServiceBus bus) in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\SubscriptionConfigur
ators\SubscriptionBusServiceConfiguratorImpl.cs:Zeile 76.
   bei MassTransit.Builders.ServiceBusBuilderImpl.RunBusServiceConfigurators(ServiceBus bus) in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\Builders\ServiceBusBuilderImpl.cs:Z
eile 119.
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei MassTransit.Builders.ServiceBusBuilderImpl.RunBusServiceConfigurators(ServiceBus bus) in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\Builders\ServiceBusBuilderImpl.cs:Z
eile 125.
   bei MassTransit.Builders.ServiceBusBuilderImpl.Build() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\Builders\ServiceBusBuilderImpl.cs:Zeile 84.
   bei MassTransit.BusConfigurators.ServiceBusConfiguratorImpl.CreateServiceBus() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\BusConfigurators\ServiceBusConfiguratorImpl.cs
:Zeile 171.
   bei MassTransit.ServiceBusFactory.New(Action`1 configure) in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\ServiceBusFactory.cs:Zeile 44.
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei MassTransit.ServiceBusFactory.New(Action`1 configure) in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\Configuration\ServiceBusFactory.cs:Zeile 48.
   bei MessageBus.Lib.Hosting.ServiceBusDescriptors.ServiceBusDescriptorBase.Start() in d:\Projects\ServiceHub\Src\Services\MessageBus.Lib\Hosting\ServiceBusDescriptors\ServiceBusDescriptorBase.cs:Zei
le 43.
   bei MessageBus.Lib.Hosting.ServiceBusManager.InitializeServiceBusDescriptions() in d:\Projects\ServiceHub\Src\Services\MessageBus.Lib\Hosting\ServiceBusManager.cs:Zeile 47.
   bei MessageBus.Lib.Hosting.ServiceBusManager..ctor(IContainer container) in d:\Projects\ServiceHub\Src\Services\MessageBus.Lib\Hosting\ServiceBusManager.cs:Zeile 35.
   bei MessageBus.Service.MessageBusService.StartMasstransit() in d:\Projects\ServiceHub\Src\Services\MessageBus.Service\MessageBusService.cs:Zeile 56.
   bei MessageBus.Service.MessageBusService.Start() in d:\Projects\ServiceHub\Src\Services\MessageBus.Service\MessageBusService.cs:Zeile 35.
   bei ServiceHub.Hosting.SingleAppDomainServiceHubHost.<Start>b__5(IService service) in d:\Projects\ServiceHub\Src\ServiceHub\Hosting\SingleAppDomainServiceHubHost.cs:Zeile 52.
   bei ServiceHub.Hosting.SingleAppDomainServiceHubHost.ExecuteOnFoundServices(Func`2 listPreparator, Action`1 action) in d:\Projects\ServiceHub\Src\ServiceHub\Hosting\SingleAppDomainServiceHubHost.cs
:Zeile 258.
   bei ServiceHub.Hosting.SingleAppDomainServiceHubHost.Start() in d:\Projects\ServiceHub\Src\ServiceHub\Hosting\SingleAppDomainServiceHubHost.cs:Zeile 51.

I think that has something to do with the correlation of the Fault.
Regards
---
Joachim

--
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.

Chris Patterson

unread,
Aug 12, 2013, 9:44:30 PM8/12/13
to masstrans...@googlegroups.com
I was able to correlate a fault to my saga using the CorrelationId of the Fault<T, Guid> as long as the CorrelationId of the message that caused the fault was the same as the correlationId of the saga. If that is not the case, you would need to add a custom correlation to the Fault event when registering it with the subscription and saga repository.

Something such as:

            configurator.StateMachineSaga(_machine, _repository, x =>

                {

                    x.Correlate(_machine.StartFaulted, (saga, msg) => saga.CorrelationId == msg.CorrelationId);

                });




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.

Joachim Rosskopf

unread,
Aug 13, 2013, 2:36:36 PM8/13/13
to masstrans...@googlegroups.com
Ah thank you. The problem was, that in my custom ISagaRepository-impl, which serializes instances to a db-table, the instance was not persisted if an exception was thrown during a callback() call.
So the Fault-Message could not get correlated to an existing instance. I fixed that and now the fault is delivered. 

Now I think there is one last thing: After the error, before the Fault-Message is sent, MT retries several times to send the message. This makes much sense for Consumer or something like this. But is in my opinion a strange behavoir for a state-machine.
Can I tell MT not to retry on messages for a Saga?

Regards.
---
Joachim

--
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.

Chris Patterson

unread,
Aug 13, 2013, 2:53:47 PM8/13/13
to masstrans...@googlegroups.com
You can use: SetDefaultRetryLimit to change the number of retries.


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.

Joachim Rosskopf

unread,
Aug 13, 2013, 2:57:26 PM8/13/13
to masstrans...@googlegroups.com

You mean immediatly at bus startup? This is then global for all consumers on the same bus-instance?

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.

--
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.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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.

--
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/fc9e50e8-65a0-49b6-91da-450202cef39c%40googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

 

--
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/MLfGfiwndOA/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.

Chris Patterson

unread,
Aug 13, 2013, 3:37:08 PM8/13/13
to masstrans...@googlegroups.com
Yes, as part of the bus configuration, and yes it's for all consumers on that bus instance.

Otherwise, you can catch and handle the exception yourself and not propagate it back to MT.


Reply all
Reply to author
Forward
0 new messages