Azure的通知中心:为什么NotificationOutcome NotificationId属性是空的? [英] Azure Notification Hub: Why is NotificationOutcome NotificationId Property Empty?

查看:699
本文介绍了Azure的通知中心:为什么NotificationOutcome NotificationId属性是空的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用标准的通知中心,我要查看遥测使用返回NotificationId,要么这个REST API特定的消息:

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/库/天蓝色/ mt608135.aspx

或NotificationHubClient GetNotificationOutcomeDetailsAsync方式:

or the NotificationHubClient GetNotificationOutcomeDetailsAsync method:

<一个href=\"https://msdn.microsoft.com/en-us/library/microsoft.azure.notificationhubs.notificationhubclient.getnotificationoutcomedetailsasync.aspx\" rel=\"nofollow\">https://msdn.microsoft.com/en-us/library/microsoft.azure.notificationhubs.notificationhubclient.getnotificationoutcomedetailsasync.aspx

无论哪种方式,我需要的是应该发送的信息时从集线器返回的通知消息ID。

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

我从应用程序后端使用SendTemplateNotificationAsync方法发送消息:

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

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

发送所述模板通知之后,result.NotificationId属性是空的。我怎样才能获得NotificationId这样我就可以再拿到遥测?

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

更新:

我试图创建NotificationHubClient当enableTestSend属性设置为true。结果仍然不包含NotificationId。

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?

推荐答案

发布此为别人谁可能遇到此问题的好处。

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

我被一个Azure的支持工程师谁帮我解决这个问题联系了。我最近从自由切换到标准层,并且在相关的变更订阅层通知集线器的错误。这需要技术支持工程师为强制同步缓存 - 它解决了这个问题。

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.

该错误已得到修复,不久将推出。如果遇到这个问题,我建议联系Azure支持。

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

这篇关于Azure的通知中心:为什么NotificationOutcome NotificationId属性是空的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆