We are building a system to precalculate all prices for all our customers. Based on some trigger (e.g. price list change) in our ERP we will put all affected customer numbers in a queue and an Azure Function listening to that queue will recalculate the prices for that specific customer.
Example: A change is done to a price list and the user clicks Save. 3000 customers are affected by this change and are added to the calculation queue. If calculation takes two seconds and we can do 10 calculations in parallel, the last customer's prices would be done after 3000*2/10=600 seconds. While a customer number is waiting in the queue, the user does another change and clicks Save. In this case we would like to exclude adding all customer numbers that are already present in the queue.
Question: Azure Service Bus Queue has a duplicate detection feature, but that is time based. Is there some other means to avoid adding a message to a queue if another message with the same content is already in the queue?
NB: All other resources are in Azure so we are only looking at Azure based queues and eventing solutions.