If I plan to install multiple instances of Orion context broker in a high availability scenario like described here, I am wondering how event notifications are handled?
So If I Register/subscribe to an specific Event, which occours then, will I be notified/called one time, or one time for each CB-instance?
In multi node deployment of Orion ContextBroker as described in referred document, there will be one notification to each event from the broker which will receive the request. The HAProxy will route each incoming request to one of multiple ContextBroker, thus one notification will be generated based on subscription made.
So If you Register/subscribe to an specific Event, then, you will be notified/called one time from one ContextBroker which has received the reuqest.
Some more references about Orion and HA/scaling-out, in the case they can be usefull:
What would be the behavior of subscriptions and notifications in an Orion Load-Balancing scenario?
How to scale Orion GE?
Related
in my setup an IoT device is connected to an MQTT broker and publishes measurements. We duplicate this traffic to another PC where we want to perform analytics on the MQTT data. We cannot create a new client to this broker and subscribe to the topics, we just want to implement a sort of sniffer for these messages and extract the measurements as a JSON.
I have experimented with scapy and various python scripts but haven't succeeded. For example, it seems that the mqtt-paho library for python requires a connection to the actual broker, but as I said this is not an option. Any idea how to approach the problem?
I'm implementing a draft of a connection between 2 Raspberry and an Arduino, connected via mqtt. I'm working on Node-RED flows and I used mqtt nodes.
As you can see, in mqtt node configuration there is the possibility to send different messages for specific moments (when the subscriber is online, when it goes offline and when it disconnects unexpectedly.
I'd like to catch this last event and handle it. How can I do it?
You need to look at the status node, this can be used to monitor other nodes.
You can point it at the MQTT node and it will report every time the status text (next to the little coloured dot under the node) changes. You can use this to detect the disconnected state.
Beware that it will probably trigger during start up as the node starts disconnected.
We have a requirement to implement Azure Service Bus as Integration point to various Applications (including apps hosted in AWS). Each application will have its own SQS. So the idea is to have Azure Service Bus with Topics and Subscription filters to route messages to each SQS accordingly. However I am not sure as to how we can pick messages from a subscription filter and push the message to AWS SQS. I am not able to see any solution for this.
These two are inherently two different messages services and you will either need to find a third party connector/bridge between the two or create your own. This would be a process that would be retrieving messages from one broker and forwarding it to another.
When it comes to a third party, there's an example that you could have a look at. NServiceBus has a community extension called Router. The router allows achieving exactly what you're looking for.
Disclaimer: I contribute and work on NServiceBus
How to make time based notifications with Orion?
Say I want to send the value of an entity every day at noon.
It seems that the functionality has been deprecated: http://fiware-orion.readthedocs.io/en/master/deprecated/
I use Orion notification service to trigger the sending of SMS with an external service (Plivo). So I cannot perform a query instead as recommended in the deprecation notice.
If it's not feasible in Orion, what complementary module do you recommend?
I would like to know how can I create tenants in Orion. I understand that you need to inform Orion of the multitenancy by adding the -multiservice parameter. However, I do not know what is necessary to create, indeed, a tenant.
From what I have seen in the documentation, my guess is that you just need to add the Fiware-Service header in each HTTP request. Therefore, if you send a updateContext with a Fiware-Service=t_01 Orion will automatically create that tenant. Is this right?
In addition to this, I also would like to know if multitenancy works correctly (or is planned to work correctly) in the following scenario:
In other words, is it possible to have several Gateways, each one with an Orion with one or more tenants, and all the Orions of all the Gateways federated to a global Orion in the cloud? Will the tenancy be respected in the global orion?
Thanks.
Your are right: Orion creates tenants "on the fly", the first time a create entity/registry operation in the given tenant is processed.
Regarding the scenario in the picture I understand that you refer to the federation approach described in this section in the manual, based on notifyContext. Given that Orion includes the Fiware-Service header in notifications, it should work.