Azure Notification Hub: Why is NotificationOutcome NotificationId Property Empty?

♀尐吖头ヾ 提交于 2019-11-28 09:18:04

问题


Using a Standard Notification Hub, I want to view telemetry for a specific message using the returned NotificationId and either this rest API:

https://msdn.microsoft.com/en-us/library/azure/mt608135.aspx

or the NotificationHubClient GetNotificationOutcomeDetailsAsync method:

https://msdn.microsoft.com/en-us/library/microsoft.azure.notificationhubs.notificationhubclient.getnotificationoutcomedetailsasync.aspx

Either way, I need the Notification Message Id that is supposed to be returned from the hub when sending the message.

I am sending the message from the app backend using the SendTemplateNotificationAsync method:

NotificationOutcome result = await hub.SendTemplateNotificationAsync(params, tags);

After sending the template notification, the result.NotificationId property is empty. How can I get the NotificationId so I can then get the telemetry?

Update:

I tried setting the enableTestSend property to true when creating the NotificationHubClient. The result still does not contain a NotificationId.

Currently there is only one device (installation) registered in the hub. Could this be due to a low number of devices receiving the push?


回答1:


Posting this for the benefit of others who may encounter this issue.

I was contacted by an Azure support engineer who helped me resolve the problem. I had recently switched from the Free to the Standard tier, and there is a bug in Notification Hubs related to changing subscription tiers. This required the support engineer to "force sync the cache" - which resolved the issue.

The bug has been fixed and will be rolling out soon. If you encounter this issue I would suggest contacting Azure support.



来源:https://stackoverflow.com/questions/36557991/azure-notification-hub-why-is-notificationoutcome-notificationid-property-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!