Context Store Notify

Last Updated : Apr 06, 2021 |

ContextStoreNotify is an optional service in Context Store, which you can use to receive notifications for any change in a context entry. The ContextStoreNotify service uses the ContextStoreRest service to send an event trigger to up to five registered subscribers through the REST interface. To use this service, you must:

  • Obtain a suitable client that can handle REST messages.

  • Create a service on your application server so that the client can handle the REST event messages.

  • Subscribe for the ContextStoreNotify service by configuring the ContextStoreNotify attributes in System Manager.

To subscribe for a notification, you must configure the ContextStoreNotify attributes using the System Manager Cluster attributes page and provide the URI of the endpoint that you want to configure for receiving notifications.

You can also provide the following optional filters:

  • The tenantId of the contexts for which you want to receive notifications.

  • The groupId of the contexts for which you want to receive notifications.

You can configure up to five subscriptions. You can enable or disable a subscription by specifying a value of true or false for the attribute enabled. You can disable or enable a subscription dynamically. However, to change any other configuration of a subscription, you must first disable the subscription, make the changes, and then enable the subscription again.

To troubleshoot problems at the notifications receiver or consumer's end, if a notification attempt fails, Context Store attempts to send this notification to that subscriber endpoint twice more in the next 40-second period. If after retrying Context Store is still unable to send the notification, Context Store disables the subscription for that endpoint.

To enable that subscription again, you must first disable the subscription by setting the ContextStoreNotify attribute enabled as false(a snap-in itself cannot update an attribute value in System Manager). After you verify that the endpoint is available for receiving notifications, you can enable the subscription by setting the value of the enabled attribute to true.