Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with turn off dead-lettering #10703

Closed
romankiss opened this issue Jun 24, 2018 — with docs.microsoft.com · 9 comments
Closed

Problem with turn off dead-lettering #10703

romankiss opened this issue Jun 24, 2018 — with docs.microsoft.com · 9 comments

Comments

Copy link

I have successful turn on a dead-lettering using a REST API update (PATCH). Everything is working well. I can update (PATCH) any part of the deadLetterDestination property.

The problem is to turn off dead-lettering.
Removing a "deadLetterDestination":null doesn't work with REST API Update call.

Note, that the other property, for instance "labels":null can be succesfful removed.

Thanks
Roman


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@vasivara-MSFT
Copy link
Contributor

@romankiss Thanks for the feedback. We are actively investigating and will get back to you soon.

@asergaz
Copy link
Contributor

asergaz commented Jun 25, 2018

Hello @romankiss can you be more specific about the

REST API update (PATCH)

and the error seen when setting

"deadLetterDestination":null

? I can't see it being used on this doc where you opened the issue at.

The examples we provide on this doc are using Event Grid extension for Azure CLI.

storagename=demostorage
containername=testcontainer

storageid=$(az storage account show --name $storagename --resource-group gridResourceGroup --query id --output tsv)

az eventgrid event-subscription create \
  -g gridResourceGroup \
  --topic-name <topic_name> \
  --name <event_subscription_name> \
  --endpoint <endpoint_URL>
  --deadletter-endpoint $storageid/blobServices/default/containers/$containername

storagename=demostorage
containername=testcontainer

storageid=$(az storage account show --name $storagename --resource-group gridResourceGroup --query id --output tsv)

az eventgrid event-subscription create \
  -g gridResourceGroup \
  --topic-name <topic_name> \
  --name <event_subscription_name> \
  --endpoint <endpoint_URL>
  --deadletter-endpoint $storageid/blobServices/default/containers/$containername

Thank you!

@romankiss
Copy link
Author

romankiss commented Jun 26, 2018

Thanks for prompt response.

The above document described how can be enabled a new feature of the subscription such as delivery a dead-letter to the blob storage destination.

This feature is declared by new property such as deadLetterDestination in the subscription properties. As the above document mentioned, the _deadLetterDestination_property (by default) doesn't exist it in the subscription, it must be turn on (added).

The document shows an example for creating a new subscription with a deadLetterDestination property using an Azure CLI.

Note, that the Azure CLI is based on the REST API calls. I am using a REST API (2018-05-01-preview) for turn on a dead-letter feature in the event grid subscription ( https://docs.microsoft.com/en-us/rest/api/eventgrid/eventsubscriptions/update).

As I mentioned, there is no problem to turn on a dead-lettering feature in the subscription, also there is no problem to update it.

The problem is to make turn off (removing) a dead-lettering in the subscription. The document shows how to turn on it, but it missing a way how to turn off a dead-lettering in the subscription. In other words, make a disable for dead-lettering in the subscription such as a default case.

Using an Azure CLI it should be the following:
az eventgrid event-subscription update --resource-id "xxxx" --name mySubscription --remove deadLetterDestination

it should be remove a deadLetterDestination property from the subscription, but this update doesn't have any effect on the subscription properties, in other words, we can not remove (turn off) the dead-lettering in the subscription when once it has been turn on or created.

I think, this is a bug and it should be fix it to allow turn on/off a dead-lettering in the subscription.

In the above document is missing an info with an example how to turn off a dead-lettering feature in the event grid subscription.

Thanks

@asergaz
Copy link
Contributor

asergaz commented Jun 28, 2018

Hello @romankiss and thank you for the clarification. I also did some tests on my own and I also couldn't
set deadLetterDestination null again (Azure CLI or REST). Since this is still in preview I believe there should be some work in progress to address that, but I will get a confirmation from the Product Group and let you know.

As a workaround can you please remove the subscription and recreate it with the same name? That would set deadLetterDestination to null again.

  1. Delete:

az eventgrid event-subscription delete -g rg1 --topic-name topic1 --name es1

  1. Recreate:
az eventgrid event-subscription create \
  -g rg1 \
  --topic-name topic1 \
  --name es1 \
  --endpoint <endpoint_URL>
  --deadletter-endpoint $storageid/blobServices/default/containers/$containername

Truly appreciate your feedback!

@tfitzmac
Copy link
Contributor

@romankiss - thanks for this feedback. We are looking into this issue. The suggestion from @sergaz-msft is a good option for now. Hopefully, we will soon know if there is another way to turn off deadlettering or a fix on the way.

@romankiss
Copy link
Author

Thanks for responses. I hope, that this bug will be resolved. There is no good option for replacing a patching (updating) a portion of the event subscription. The above suggestion requires to make multiple calls such as:

  • get the event subscription
  • get the full endpointUrl
  • delete subscription
  • creating a new subscription without the deadLetterDestination

Note, that the patching of the deadLetterDestination property is working, just the problem is to remove it (such as "deadLetterDistination":null)

Thanks

@asergaz asergaz assigned tfitzmac and unassigned asergaz Jun 29, 2018
@tfitzmac
Copy link
Contributor

@romankiss - you can remove the dead letter destination by just re-running the create command without deadletter-endpoint. You don't need to delete it first.

@romankiss
Copy link
Author

romankiss commented Jul 13, 2018

@tfitzmac - for "just re-running" the create command without deadletter-endpoint means to get in prior all values of the event subscription, such as:

  • get the event subscription
  • get the full endpointUrl

so, in other words, instead of the single PATCH call, we have to call GET, GET, PUT + some necessary coding for properties. That's done in the REST API today, when the deadLetterDestination property must be removed from the event subscription.
It is definitely a bug.

@tfitzmac
Copy link
Contributor

@romankiss - I have forwarded your feedback, but you should also add it to feedback forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants