简体   繁体   English

我可以在创建和删除实体时发送通知吗?

[英]Can I send a notification in the creation and deletion of an entity?

I want to be notified when an entity is created or deleted.我想在创建或删除实体时收到通知。 Does Orion support subscribing to the creation and deletion of entities? Orion 是否支持订阅实体的创建和删除?

Yes it does, in Orion Context Broker - NGSIv2 - you have got the following alteration triggers:是的,在 Orion Context Broker - NGSIv2 - 你有以下改变触发器:

entityUpdate : notification is sent whenever a entity covered by the subscription is updated (no matter if the entity actually changed or not) entityUpdate :每当订阅涵盖的实体更新时发送通知(无论实体是否实际更改)

entityChange : notification is sent whenever a entity covered by the subscription is updated and it actually changes (or if it is not an actual update, but forcedUpdate option is used in the update request) entityChange :只要订阅涵盖的实体更新并且它实际更改(或者如果它不是实际更新,但在更新请求中使用了 forcedUpdate 选项),就会发送通知

entityCreate : notification is sent whenever a entity covered by the subscription is created entityCreate :每当创建订阅涵盖的实体时发送通知

entityDelete : notification is sent whenever a entity covered by the subscription is deleted entityDelete :每当删除订阅涵盖的实体时发送通知

Complete documentation: https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#subscriptions-based-in-alteration-type完整文档: https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#subscriptions-based-in-alteration-type

Best.最好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM