Walterf
Walterf

Reputation: 41

Subscription to Cygnus in case of Orion context Broker multitenant not working

I tested the basic subscription mechanism of Orion setting an instance of Cygnus as a reference and it works well: once Orion receives an updateContext of my entity, it fires a notification to Cygnus that persists the data to the defauld mySQL db.

But if I add the following headers to the subscription:

fiware-service: sat Fiware-ServicePath: /proto1

in order to save the data in another mySQL db, Orion accepts the subscription but does not fire any notification to Cygnus.

I tried to add the same headers to the updateContext REST call without success. Any idea?

PS:

Orion version 0.22

Cygnus version 0.8

Upvotes: 2

Views: 280

Answers (1)

Walterf
Walterf

Reputation: 41

I found out the problem: headers have to be inserted also in the registration of the entity (*). So, the correct sequence of operations is:

1) First, register your entity with a POST /NGSI10/updateContext call specifying "APPEND" updateAction in payload and including "fiware-service" and "fiware-servicepath" headers.

2) Make a subscription (/ngsi10/subscribeContext) to Orion including exactly the same headers above

3) Update your entity including the headers above

(*)Since I was using Data Handling GE as NGSI source and Orion as an event sink, updates to my entities were fired directly by Data Handling GE under certain conditions set by an esper rule/statement. It seems that Data Handling GE does not add the headers when it performs updates to event sinks.

Upvotes: 2

Related Questions