diff --git a/README.md b/README.md index 2b57b4ee6eca7a61331f93d71aa7458c0236a752..7867dcdb01900df40e8a93b29035f5514be6a630 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This repository is a centralized version of architecture for IPos software (Indo ## How to run? 1. Start [hivemq](http://www.hivemq.com/demos/websocket-client/). It's a client for an external test MQTT-broker. - 1. Establish a connection with the standard parameters (WS coonection). + 1. Establish a connection with the standard parameters (WS connection). 2. Add new subscriptions with `Add New Topic Subscription` button - `test51/subscribe/positions`: responses - `test51/publish/positions`: requests @@ -25,6 +25,24 @@ This repository is a centralized version of architecture for IPos software (Indo  +## Configurations +- External MQTT broker + - Parameters for a connection are in `src/main/resources/application.yml` + - ```yaml + mqtt: + automaticReconnect: true + cleanSession: true + setKeepAliveInterval: 10 + connectionTimeout: 20 + clientId: ipos.project + hostname: broker.hivemq.com + port: 1883 + ``` + - Parameters are used in `src/main/java/ipos/project/config/MqttConfig.java` + - `@ConfigurationProperties(prefix = "mqtt")` refers to all relevant parameters + - create `MqttConnectOptions` bean + - create `MqttAsyncClient` bean. Require `MqttConnectOptions` + ### Extra - Internal database: [localhost:8077/h2-console](http://localhost:8077/h2-console)