RequestGenerator is created to help stress test the entire distributed system with various loads.
Example/default scenario: 100 different users each submitting single booking requests for a single dental office within a time-interval of ten seconds.
- Install Java JDK 8 or above
- Install Maven 3.5 or above
- Install MQTT Broker (e.g. Mosquitto) and run it locally on port 1883
- For a helpful tutorial refer to Steve's Internet Guide
Make sure to have the Booking component running before running the RequestGenerator.
- Clone repository to your machine
- Open a terminal window (e.g. Command Prompt) and move to the root folder of the repository. Enter command
mvn clean install
This will create a target folder. - To ensure that installation was successful, check target folder for RequestGenerator.jar file.
- Move to target folder and enter command
java -jar RequestGenerator.jar
. This will enable the RequestGenerator to start publishing requests to the MQTT Broker.
To change:
- the number of requests made per user, change the
NUMBER_OF_REQUESTS_PER_USER
variable. - the topic to publish requests to, change the
TOPIC
variable. - the dentist office to make booking requests to, change the
DENTIST_ID
variable. - the number of users that sends requests, change the
NUMBER_OF_USERS
variable.