Can someone let me know if its possible to enable/update a Service Queue with Dupliate Message Detection after the Queue has been created?
The following link describes how to enable Duplicate Message Detection while creating a queue.
https://docs.microsoft.com/en-us/azure/service-bus-messaging/enable-duplicate-detection
But I’m not seeing any information on how update an existing Queue to allow for Duplicate Message Detection … or am I looking in the right place?
>Solution :
The article you linked to has a big purple Note block right after the first paragraph. It states two things. The second statement is:
You can’t enable or disable duplicate detection after the queue or topic is created. You can only do so at the time of creating the queue or topic.
This means you cannot update an existing Queue to allow for Duplicate Message Detection.
EDIT:
A small addition to the above: there is an --enable-duplicate-detection parameter for the az servicebus queue update Azure CLI command. Trying to use this, however, returns a BadRequest with SubCode 40000 and a specific error message.
Looking at Service Bus Resource Manager exceptions – Error: Bad Request, it states the following:
Error message Description Recommendation SubCode=40000. The value for the ‘requiresDuplicateDetection’ property of an existing Queue(or Topic) cannot be changed. The value for the ‘requiresDuplicateDetection’ property of an existing Queue(or Topic) cannot be changed. Duplicate detection must be enabled/disabled at the time of entity creation. The duplicate detection configuration parameter cannot be changed after creation.