For an application manager (connector) we're interested in some resource information.
Is it possible to subscribed to certain resource changes instead of needing to request the resource information continuously in order to detect changes?
If so, how would we be able to do this? Is there already a library available for this?
Hi Brecht,
You can subscribe on 'ResourceManagerEventMessage'. As far as I know there's no library for this, you need to use the raw message.
What Jorge mentioned is correct: you can subscribe to the 'ResourceManagerEventMessage', but by default this means you will receive an event for resource, resource pool and booking updates. You can filter your subscription to only receive resource updates. I would also recommend to disable the 'Initial events', which sends out an initial message with all resources after subscribing.
Some example code:
// If interested in all resources, you can use 'new TRUEFilterElement<Resource>()'
// With the filter below you will only receive updates for resources containing 'encoder' in the name
var filter = ResourceExposers.Name.Contains("Encoder");
var subscriptionFilter = new SubscriptionFilter<ResourceManagerEventMessage, Resource>(filter)
{
// Don't send the initial event
Options = SubscriptionFilterOptions.SkipInitialEvents
};