The attached file contains two $system.Event examples that processes work asynchronously using persistent queues:
- Events_Simple.prj.xml
- Events_PubSub.prj.xml - updated this example has been published on https://github.com/intersystems-ib/cache-iat-pubsub
Events_Simple
This is a very basic example that creates some worker processes and then enqueue messages to them using $system.Event.
; create shared resource, create worker jobs.USER>do ##class(IAT.S04.Event.Test).Setup(); enqueue some messages to workers and see what happensUSER>do ##class(IAT.S04.Event.Test).Run()Show log? no/[yes]:^
