Go to documentation repository
Intellect Axxon PSIM can act as receiver and transmitter of RabbitMQ events. Download and install the following components from the https://www.rabbitmq.com/install-windows.html website before using this functionality:
...
The examples below mention the amqp_sendstring.exe and amqp_listen.exe utilities. These utilities for processing and sending messages from the Intellect Axxon PSIM are to be implemented by programmer.
...
application/json – a message is sent and received in JSON format. If Intellect Axxon PSIM cannot parse the message in JSON format, an attempt is made to recognize the message in plain/text format.
plain/text – the Intellect Axxon PSIM event is sent and received in the format "TYPE|ID|EVENT"
...
Intellect Axxon PSIM provider operates in amq.topic mode, and the receiver operates in amq.direct mode.
amq.topic allows for subscriptions ranging. Each event sent from Intellect Axxon PSIM is signed with a special header, which is built according to the following scheme:
routingkey = "intellectAxxon PSIM.event." + msg.GetSourceType() +"." + msg.GetSourceId() + "." + msg.GetAction();
...
amqp_listen.exe localhost 5672 amq.topic intellectAxxon PSIM.event.#
Subscription to Action==”RUN” events
amqp_listen.exe localhost 5672 amq.topic intellectAxxon PSIM.event.*.*.RUN
| Note | ||
|---|---|---|
| ||
Events enter the RabbitMQ queue from each Intellect Axxon PSIM core individually. For example, if there are two cores in the system, and the event occurred on a core that has incorrect settings or does not have a connection to RabbitMQ, the event will not get into the queue, despite the fact that the second core will receive it. Each core sends only its own messages. |
...
The receiver is implemented according to the amq.direct scheme. It is subscribed to all events with the "bindingkey" key. bindingkey should have the following format: "intellectAxxon PSIM." + ComputerName (case sensitive).
...
Example events that will be receiver by Intellect Axxon PSIM core:
text:
amqp_sendstring.exe localhost 5672 amq.direct intellectAxxon PSIM.ASUS "CAM|1|HELLO"
or JSON
amqp_sendstring.exe localhost 5672 amq.direct Axxon intellectPSIM.ASUS {\"Type\":\"MACRO\",\"Id\":\"1\",\"Action\":\"RUN\",\"Params\":{\"test1\":\"+++\",\"test2\":\"000\"}}