コード例 #1
0
ファイル: Program.cs プロジェクト: putjes/NServiceBus-1
        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();
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: nghead/NServiceBus
        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();
            }
        }