Skip to content

melexis/machine-event-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

machine-event-simulator

This is dummy project to generate dummy events from fake machines to do some technical tests of new employee

how to use

prerequisite

You need to have java11 or above installed on your computer.

You need to have maven installed.

You need to have docker installed

You need then to start activemq server by running following command in a terminal:

docker run --name='activemq' -p61616:61616 -it --rm -P webcenter/activemq:5.14.3

If ok you should see the following:

my-prompt$ docker run --name='activemq' -p61616:61616 -it --rm -P webcenter/activemq:5.14.3
2019-08-16 14:24:12,209 CRIT Supervisor running as root (no user in config file)
2019-08-16 14:24:12,209 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
2019-08-16 14:24:12,209 WARN Included extra file "/etc/supervisor/conf.d/activemq.conf" during parsing
2019-08-16 14:24:12,224 INFO RPC interface 'supervisor' initialized
2019-08-16 14:24:12,224 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-08-16 14:24:12,224 INFO supervisord started with pid 1
2019-08-16 14:24:13,228 INFO spawned: 'cron' with pid 16
2019-08-16 14:24:13,232 INFO spawned: 'activemq' with pid 17
2019-08-16 14:24:14,610 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-16 14:24:14,610 INFO success: activemq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

how to run

From your favorite IDE (like intellij), just run the class GeneratorMain with following arguments (or run the uberjar created in generator/target):

tcp://localhost:61616 machine.event 10 150

This will connect to local activemq server you started and generator on queue machine.event 10 messages with random timing between each of few seconds that simulates the normal load expected on production for 150 machines given as parameter (which is roughly the amount of running machines on our production floor).

If debug is added at the end of command then it will consume the produced message (to confirm setup is working fine):

tcp://localhost:61616 machine.event 10 150 debug

About

Manufacturing Machine Event Simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages