Description
Describe the bug
When EnableIndexes is set to false during set up, we are making IndexConsumer inactive. One issue is that QueueProvider.QueueWork(WorkflowId, QueueType.Index) is still being called in different places in the code, causing the queue for Index to build up.
To Reproduce
Steps to reproduce the behavior:
Set EnableIndexes to false and use Workflow Core. In Persistence of your choice (in my case Redis), you will see an entry for {prefix}-index. This persisted data will grow as there is no process dequeuing the entries
Expected behavior
When EnableIndexes is set to false, no queuing for QueueType.Index should happen.
Additional context
This behavior caused storage to increaase. In the case of Redis, Key with name {prefix}-index will keep growing in size as there is no process to dequeue the Index items.