Example #1
0
        static void MigrateMessage(TimeoutData timeoutData, string messageId)
        {
            //fake the return address of the message
            DestinationOverride.CurrentDestination = Address.Parse(timeoutData.Destination);

            using (var scope = new TransactionScope(TransactionScopeOption.Required))
            {
                bus.Send <TimeoutMessage>(newTimeoutManagerAddress, tm =>
                {
                    tm.ClearTimeout = false; //always false since we don't store the "clear" requests
                    tm.Expires      = timeoutData.Time;
                    tm.SagaId       = timeoutData.SagaId;
                    tm.State        = timeoutData.State;
                });

                storageQueue.ReceiveById(messageId);

                scope.Complete();
            }
        }
Example #2
0
        static void MigrateMessage(TimeoutData timeoutData, string messageId)
        {
            //fake the return address of the message
            DestinationOverride.CurrentDestination = Address.Parse(timeoutData.Destination);

            using (var scope = new TransactionScope(TransactionScopeOption.Required))
            {
                bus.Send<TimeoutMessage>(newTimeoutManagerAddress, tm =>
                {
                    tm.ClearTimeout = false; //always false since we don't store the "clear" requests
                    tm.Expires = timeoutData.Time;
                    tm.SagaId = timeoutData.SagaId;
                    tm.State = timeoutData.State;
                });

                storageQueue.ReceiveById(messageId);

                scope.Complete();
            }
        }