I was looking for a fallback for Analytics when MongoDB was not available anymore and the "Submit queue" was exactly what I needed on paper.
It seems that the "
Sitecore.Analytics.SubmitQueueService" is not running.
When MongoDB is down, a queue file will be created in
Data\Submit-Queue. This file will be flushed in MongoDB, when the server is reachable again, resulting in eventually deleting the file (or at least getting smaller in size).
The queue file is only created when MongoDB is down, which is good. However, the file keeps growing over time, even though the MongoDB server is back online.
What I did
.config files according to this article.
<submitQueue> <backgroundService type="Sitecore.Analytics.SubmitQueueService, Sitecore.Analytics"> <!-- Service wakeup interval in seconds. --> <Interval>60</Interval> </backgroundService> </submitQueue>
<setting name="Analytics.UseSubmitQueue" value="true" />
<mongo recoveryTimeout="60"> <driver type="Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver, Sitecore.Analytics.MongoDB"> <param desc="connectionString">$(0)</param> <param desc="failOnReadErrors">false</param> </driver> </mongo>
<setting name="Analytics.FailOnDatabaseErrors" value="false" />
I made sure a queue file is created (So MongoDB is made inaccessible).
After this, I start the MongoDB server again to see if my queue file is shrinking. Sadly it is not, it grows.
I also checked my logs from the moment that I started MongoDB again, but no logs are indicating something is wrong. It was also not running in the background as a Job (assuming it is Sitecore Job).
- Sitecore.NET 8.2 (rev. 161221)
There still seem to be MongoDB connection errors, even though Submit queue should be active.
[DatabaseNotAvailableException: Database not available] Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.Execute(Action action, ExceptionBehavior exceptionBehavior) +110 Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.Save(Object value) +155 Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDataAdapterProvider.Update(IUpdatableObject container) +418 Sitecore.Analytics.Pipelines.SubmitSessionContext.SaveClassificationsMap.Process(SubmitSessionContextArgs args) +1152 ...
Hopefully I gave enough information!