Hello,
In Worker, to increase transaction timeout just set below configuration, right?
factory.SetDefaultTransactionTimeout(new TimeSpan(0, 0, 3, 0));
Thanks
Márcio Fábio Althmann
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.
In my worker, when i call a wcf to process the message information, and i’m sleeping for testing the processing of the message for 1 minute, the worker throw a transactino timeout error, with the timeout higher.
The code of Worker.
public DoWork()
{
_log.InfoFormat("Inicializando o Worker");
LoadWorkerConfigurations();
_log.InfoFormat("Inicializando módulos");
LoadNinjectModules();
_log.Info("Inicializando o ServiceBus");
DataBus = ServiceBusFactory.New(factory =>
{
factory.ReceiveFrom(_sourceQueue);
factory.SetPurgeOnStartup(false);
factory.UseMsmq();
factory.UseMulticastSubscriptionClient(client => client.SetNetworkKey(_networkKey));
factory.SetConcurrentConsumerLimit(_concurrentWorkerLimit);
factory.ImplementDistributorWorker<EntitySaveMessage>(ConsumeEntitySaveMessage, _progressLimit, _pendingLimit);
factory.ImplementDistributorWorker<EntityCallRecordContextMessage>(ConsumeEntityCallRecordContextMessage, _progressLimit, _pendingLimit);
factory.ImplementDistributorWorker<EntityCallTableContextMessage>(ConsumeEntityCallTableContextMessage, _progressLimit, _pendingLimit);
factory.SetDefaultTransactionTimeout(new TimeSpan(0, 10, 0));
factory.UseControlBus();
});
ControlBus = DataBus.ControlBus;
_log.Info("ServiceBus inicializado");
}
Log
ERROR 27-07-2011 09:31:03 - Consumer Exception Exposed
System.Transactions.TransactionAbortedException: The transaction has aborted. ---> System.TimeoutException: Transaction Timeout
--- End of inner exception stack trace ---
at System.Transactions.TransactionStatePromotedAborted.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)
at System.Transactions.CommittableTransaction.Commit()
at System.Transactions.TransactionScope.InternalDispose()
at System.Transactions.TransactionScope.Dispose()
at MassTransit.Transports.Msmq.TransactionalInboundMsmqTransport.Receive(Func`2 callback, TimeSpan timeout)
at MassTransit.Transports.Transport.Receive(Func`2 callback, TimeSpan timeout)
at MassTransit.Transports.Endpoint.Receive(Func`2 receiver, TimeSpan timeout)
at MassTransit.Context.ServiceBusReceiveContext.ReceiveFromEndpoint()