system.util.sendMessage to all Gateway Nodes

We use the new Ignition release 7.9-RC2 on 2 Gateway Pair (1st Pair with ProjectName1 and 2nd Pair with ProjectName2).

How can we use sendMessage to all Gateway?

Actually, when I use this cmd from the ProjectName2
system.util.sendMessage(project=“ProjectName1”,messageHandler=“RED_requestFailover”,remoteServers =[“1PAIR”,“2PAIR”])

I observe on the active Gateway this message in MessageDispatchManager log
“Error during message dispatch:Project ‘ProjectName1’ was not found!”

Any suggestions?

For each of the Gateways that is supposed to receive the message, you will need to set up projects named ‘ProjectName1’ and ‘ProjectName2’. In each of those projects, you will need to set up a message handler under Gateway Event Scripts named ‘RED_requestFailover’. After the projects are saved with the message handlers, you should be able to see messages sent to the Gateways.

If we have only one project by gateway, GW A with project A and GW B with project B, we can’t send a message from project A to project B thru GAN !

system.util.sendMessage(project="project B",messageHandler="...",remoteServers =[GW B])

fail in project A because the project B doesn’t exist on the GW A…It’s a bit confusing, not to be able to exchange message in this way between 2 gateway !!! :scratch:

To be honest, the sendMessage() function existed long before Gateway Network did, and we just kind of tacked remote gateway functionality on top of it. There are definitely improvements we can make down the line to avoid awkwardness like this.

I see… would be good if you could enable this kind of gateway message in next 7.9 release :prayer:

Hi,

Just wanted to let you know that we’ve fixed the big problem mentioned here for 7.9.0 final: if a project didn’t exist locally, it would not even try to send it to the remote system (even if the local gateway wasn’t in the target list!). Now it will correctly attempt to send to all matching servers.

Two notes:

  1. If you specify remoteServers, you must also specify the local server name in the list, if you want it to also go to the local server. If remote servers are not specified, the function works normally.

  2. A message handler is always identified by “project name + handler name”. This means that “project” must be valid for whatever gateway you’re targeting. It doesn’t have to exist locally any more, but it does have to exist on the receiver.

Regards,

:thumb_left: :thumb_left: :thumb_left: it will be perfect for communications between gateway !