Tag: 分布式

提供的锁无效。 锁已过期,或者消息已从队列中删除

我正在使用Microsoft azure服务总线队列来处理计算,我的程序可以正常运行几个小时,但后来我开始为我从那时开始处理的每条消息获得此exception。 我不知道从哪里开始,因为前几个小时一切正常。 我的代码似乎也很准确。 我将发布处理azure服务总线消息的方法。 public static async Task processCalculations(BrokeredMessage message) { try { if (message != null) { if (connection == null || !connection.IsConnected) { connection = await ConnectionMultiplexer.ConnectAsync(“connection,SyncTimeout=10000,ConnectTimeout=10000”); //connection = ConnectionMultiplexer.Connect(“connection,SyncTimeout=10000,ConnectTimeout=10000”); } cache = connection.GetDatabase(); string sandpKey = message.Properties[“sandp”].ToString(); string dateKey = message.Properties[“date”].ToString(); string symbolclassKey = message.Properties[“symbolclass”].ToString(); string stockdataKey = message.Properties[“stockdata”].ToString(); string stockcomparedataKey […]