protected override void RemoveUnPublishedEvents(Abstracts.MessageStore messageStore, string[] toRemoveEvents) { if (messageStore.InMemoryStore) { base.RemoveUnPublishedEvents(messageStore, toRemoveEvents); return; } var deleteEventsSql = $"delete from msgs_UnPublishedEvents where Id in ({string.Join(",", toRemoveEvents.Select(rm => $"'{rm}'"))})"; messageStore.Database.ExecuteSqlCommand(deleteEventsSql); }
protected override void RemoveUnSentCommands(Abstracts.MessageStore messageStore, string[] toRemoveCommands) { if (messageStore.InMemoryStore) { base.RemoveUnSentCommands(messageStore, toRemoveCommands); return; } messageStore.GetMongoDbDatabase() .GetCollection <UnSentCommand>("unSentCommands") .DeleteMany(Builders <UnSentCommand> .Filter .AnyIn("_id", toRemoveCommands)); }