Jordi
Jordi

Reputation: 21

Is it possible to configure different resolutions for a sth-comet sink?

We have deployed in docker an instance of Orion Context Broker, an instance of Cygnus and an instance of STH-Comet using the formal approach. We need to save some entities in the MongoDB aggregates with the resolution of month, day and others with the resolution of month, day, hour and, finally, others with the resolution of month, day, hour, minute.

Is it possible to achieve this task?

Thank you very much in advance.

Upvotes: 0

Views: 39

Answers (1)

Perrolobo
Perrolobo

Reputation: 663

Yes It is possible.

At Cygnus you will need to configure different STHSink instances, one for each desired resolution set.

Then there are several options to drive the NGSI notifications to the corresponding Sink:

One simple approach could be to associate different flume-sources-channel-sink to each sink (with a given port each). So you may store different resolutions depending to which port is included in the subscription.

You may use also NGSI Custom Notifications (by modifying Fiware-ServicePath header for example) along with Cygnus header multiplexing capability so you can route notifications to different channels-sink

<Agent>.sources.<Source1>.selector.type = multiplexing
<Agent>.sources.<Source1>.selector.header = <someHeader>
<Agent>.sources.<Source1>.selector.mapping.<Value1> = <Channel1>
<Agent>.sources.<Source1>.selector.mapping.<Value2> = <Channel1>
 <Channel2>
<Agent>.sources.<Source1>.selector.mapping.<Value3> = <Channel2>

Upvotes: 1

Related Questions