iris-ipc-utils

Downloads7
Subscribe
0
Bookmark
0
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Issues
Articles

What's new in this version

Initial Release

Gitter
Quality Gate Status
Reliability Rating

License: MIT

observer-pattern

Description

This is an example of $SYSTEM.Event usage.

A DC article is availalbe in FR here and EN soon.

Installation

Clone/git pull the repo into any local directory

$ git clone https://github.com/lscalese/iris-ipc-utils.git
$ docker-compose up -d

Usage

With a listener

Open a terminal a start to listen the event “Demo”

IRISAPP>Do ##class(dc.ipcutils.BasicListener).%New().Listen()

Open a second terminal to send a notification :

Do ##class(dc.ipcutils.Manager).Notify("Demo:OnTest",{"Message":"My FirstTest"}.%ToJSON())

Now you see the result in the first terminal:

IRISAPP>Do ##class(dc.observer.BasicListener).%New().Listen()

2023-09-27 20:43:46 + Listening Demo with resourcename ODYzMjAxNTAwNTAwMQ started.
2023-09-27 20:43:46 + Type < ctrl+c > to stop listening.
2023-09-27 20:45:58 = Event received:
{
"Event":"Demo:OnTest",
"EventType":"Demo",
"EventName":"OnTest",
"PIDSource":"710",
"Timestamp":"2023-09-27 20:45:58",
"Context":{
},
"Data":"{"Message":"My FirstTest"}"
}

IPM installation
zpm "install ipc-utils"
Rating
5 (1)
ObjectScript quality test
Passed
Updated on 05 December 2023
ObjectScript quality report
Category
Technology Example
Works with
InterSystems IRIS
Tags
Info
Version
1.0.0
Last updated
2023-11-09
Repository
Open
Documentation
Open
License
Link