Skip to content
Snippets Groups Projects
Commit 25d15c5b authored by Oleksandr Husak's avatar Oleksandr Husak
Browse files

upd readme: add description for mqtt connection

parent a0db9dd0
Branches
No related tags found
No related merge requests found
......@@ -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
![](demo.v1.jpg)
## 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment