Commit 65b7891d by 丁松杰

修复 写入 错误队列后 没有 ack

parent 8fc078fb
......@@ -12,4 +12,3 @@ namespace Pole.Core
public const string ConsumerExceptionDetailsStr = "pole-consumer-exception-details";
}
}
}
......@@ -40,7 +40,6 @@ namespace Pole.EventBus.RabbitMQ
private Timer DistributedMonitorTime { get; set; }
private Timer DistributedHoldTimer { get; set; }
const int lockHoldingSeconds = 60;
int distributedMonitorTimeLock = 0;
int distributedHoldTimerLock = 0;
int heathCheckTimerLock = 0;
private async Task Start()
......
......@@ -138,10 +138,10 @@ namespace Pole.EventBus.RabbitMQ
Model.Model.ExchangeDeclare(errorExchangeName, "direct", true);
Model.Model.QueueDeclare(errorQueueName, true, false, false, null);
Model.Model.QueueBind(errorQueueName, errorExchangeName, string.Empty);
}
if (!Consumer.Config.AutoAck)
{
Model.Model.BasicAck(ea.DeliveryTag, false);
if (!Consumer.Config.AutoAck)
{
Model.Model.BasicAck(ea.DeliveryTag, false);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment