Aeronbroker / Aeron

Aeron is an Internet-of-Things middleware based on the OMA NGSI 9/10 standard.
Other
23 stars 9 forks source link

Subscription notification in xml ? #18

Closed Sypheos closed 7 years ago

Sypheos commented 7 years ago

Hello,

This is a question for the subscription. I built Aeron locally and successfully trigger a subscription notification. But the notification is in JSON format even though all of the other interaction or in XML.

Any method to have the notification in xml ?

flaviocirillo commented 7 years ago

Hello Sypheos,

since the NotifyContext is an HTTP message exchange initialized from the IoT Broker, the latter will try this communication following the preference "iotbroker_producedtype" specified in the user configuration file "IoTBroker-runner/iotbroker.conf.local" or the default file "IoTBroker-runner/iotbroker.conf.default" (https://github.com/Aeronbroker/Aeron#configure-the-iot-broker-with-setup-scripts).

In case you are starting the IoT Broker from the shell, then just change (or append at the end), the following preference:

iotbroker_producedtype="application/xml"

In case you are starting the IoT Broker via docker, do the following (https://github.com/Aeronbroker/Aeron/tree/master/docker):

docker run -t -p 8065:8065 -p 8060:8060 fiware/iotbroker:v5.4.3-standalone -p iotbroker_producedtype="application/xml"

We are considering for the future to implement some mechanism to keep track of the preferences specified in the subscription message.

Best Regards Flavio

Sypheos commented 7 years ago

Hello @flaviocirillo

Thanks for the tip. Greatly appreciate! Managing both json and xml in the same application is a bit troublesome. Truthfully it's surprising to receive Json when you all the request are application/xml.

Looking forward to the future implementations.

Best regards, Sylvain