This example provides a sandbox for testing the IDM flow control utility in isolation.
The project consists of two domains: Sender
and Receiver
.
The Receiver
domain has a single public service ReceiveData
which is marked
as an IDM topic with the key "Receive_Data". The Receiver
domain also has an
empty init
scenario and a Reception
terminator with operations which invoke
the IDM
utility domain to reconfigure the flow controls for the
"Receive_Data" topic.
The Sender
domain has a single terminator Port
with a single service
SendData
to send data to the Receiver
domain. It also has an object with a
state model to facilitate calling this terminator service once per second. The
Sender
domain also has an empty init
scenario. This domain can be modified
to send with different patterns or ignored altogether in favor of a Python
script.
The domains are wired together with three MASL deployments. IdmTest
includes
both domains in a single project and results in a configuration where direct
calls are made within one process. SenderOnly
and ReceiverOnly
are just as
they sound and are used to configure the deployment to communicate over a
network.
In the root of the repository run:
./build-test.sh
To run the project in single process mode, in the root of the repository run:
./run-test.sh
To run the project with multiple processes across the ActiveMQ broker, you must
first launch an instance of the broker docker image
(apache/activemq-classic:latest
). The easiest way to do this is to launch the
docker-compose.activemq.yml
configuration from the deploy/
directory within
the munin
repository. If you do this, be sure to add port 5672
to the ports
list to expose the transport port other docker images. You may also want to
uncomment the line exposing port 8161
in order to access the web console.
Once ActiveMQ is up and running, in one shell run:
./run-receiver.sh
In another shell run:
./run-sender.sh