In our application we have a requirement to expire tasks that are not completed in 30 days after creation. Emails need to be send.
I used DeadlineHandler to implement it. However, I have following issues now:
1. TaskService can be created a first time. Since code in the TaskService running query every time that it is instanciated and queue allows for duplicates, I have multiple threads for the same task.
2. The second question. Out tasks have expiration ser to 30 days. There will be quite a lot of entries in the queue.
I am running in the clustered enviroment wihout distributed cache. If I create TaskService once then, I will different cache entries on different servers.
My question is : What will be your recommendation in this case? How did you guys envision it ?