4
4
5
5
# HiveMQ MQTT Client
6
6
7
- [ ![ Build Status] ( https://travis-ci.org/hivemq/hivemq-mqtt-client.svg?branch=develop )] ( https://travis-ci.org/hivemq/hivemq-mqtt-client )
8
7
[ ![ Maven Central] ( https://maven-badges.herokuapp.com/maven-central/com.hivemq/hivemq-mqtt-client/badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/com.hivemq/hivemq-mqtt-client )
9
8
[ ![ JitPack] ( https://jitpack.io/v/hivemq/hivemq-mqtt-client.svg )] ( https://jitpack.io/#hivemq/hivemq-mqtt-client )
9
+ [ ![ Build Status] ( https://travis-ci.com/hivemq/hivemq-mqtt-client.svg?branch=develop )] ( https://travis-ci.com/hivemq/hivemq-mqtt-client )
10
+ [ ![ Language grade: Java] ( https://img.shields.io/lgtm/grade/java/g/hivemq/hivemq-mqtt-client.svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/hivemq/hivemq-mqtt-client/context:java )
11
+ [ ![ Total alerts] ( https://img.shields.io/lgtm/alerts/g/hivemq/hivemq-mqtt-client.svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/hivemq/hivemq-mqtt-client/alerts/ )
10
12
11
13
MQTT 5.0 and 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and
12
14
backpressure support.
@@ -22,23 +24,44 @@ backpressure support.
22
24
23
25
## Features
24
26
25
- - All MQTT 3.1.1 and MQTT 5.0 features
27
+ - ** All [ MQTT 3.1.1] ( http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt-v3.1.1-errata01-os-complete.html ) and
28
+ [ MQTT 5.0] ( https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html ) features**
26
29
- API flavors:
27
- - Reactive, Async and Blocking
28
- - Flexible switching
29
- - Consistent and clearly separated
30
- - Backpressure support:
30
+ - ** Reactive** : [ Reactive Streams] ( https://www.reactive-streams.org/ ) compatible,
31
+ [ RxJava] ( https://github.com/ReactiveX/RxJava ) and [ Reactor] ( https://github.com/reactor/reactor-core ) APIs available
32
+ - ** Asynchronous API** : futures and callbacks
33
+ - ** Blocking API** : for quick start and testing
34
+ - Switch flexibly between flavours and use them concurrently
35
+ - Flavours are clearly separated but have a consistent API style
36
+ - ** Backpressure support** :
31
37
- QoS 1 and 2
32
38
- QoS 0 (dropping incoming messages, if necessary)
39
+ - Bringing MQTT flow control and reactive pull backpressure together
33
40
- Transports:
34
41
- TCP
35
- - SSL/TLS
36
- - WebSocket, Secure WebSocket
37
- - Automatic and configurable thread management
38
- - Automatic and configurable reconnect handling and message redelivery
39
- - Lifecycle listeners (connected, disconnected)
42
+ - ** SSL/TLS**
43
+ - All TLS versions up to TLS 1.3 are supported
44
+ - TLS mutual authentication
45
+ - TLS Server Name Indication (SNI)
46
+ - TLS Session Resumption
47
+ - Default and customizable hostname verification
48
+ - ** WebSocket** , Secure WebSocket
49
+ - ** Proxy** : SOCKS4, SOCKS5, HTTP CONNECT
50
+ - All possible combinations
51
+ - Automatic and configurable ** thread management**
52
+ - Automatic and configurable ** reconnect handling and message redelivery**
53
+ - Automatic and configurable ** resubscribe if the session expired**
54
+ - ** Manual message acknowledgment**
55
+ - Selectively enable manual acknowledgement only for specific streams
56
+ - Acknowledge messages emitted to multiple streams independently per stream,
57
+ the client aggregates the acknowledgements before sending MQTT acknowledgements
58
+ - Order of manual acknowledgment does not matter,
59
+ the client automatically ensures the order of MQTT acknowledgments for 100% compatibility with the MQTT specification
60
+ - Lifecycle listeners
61
+ - When connected
62
+ - When disconnected or connection failed
40
63
- MQTT 5 specific:
41
- - Pluggable Enhanced Auth support (additional to MQTT specification: server-triggered reauth )
64
+ - Pluggable Enhanced Authentication support (additional to MQTT specification: server-triggered re-authentication )
42
65
- Automatic Topic Alias mapping
43
66
- Interceptors for QoS flows
44
67
@@ -68,7 +91,18 @@ If you use Gradle, just include the following inside your `build.gradle` file.
68
91
69
92
``` groovy
70
93
dependencies {
71
- compile group: 'com.hivemq', name: 'hivemq-mqtt-client', version: '1.1.4'
94
+ implementation group: 'com.hivemq', name: 'hivemq-mqtt-client', version: '1.2.0'
95
+ }
96
+ ```
97
+
98
+ For optional features you can choose to include additional modules:
99
+
100
+ ``` groovy
101
+ dependencies {
102
+ implementation group: 'com.hivemq', name: 'hivemq-mqtt-client-websocket', version: '1.2.0'
103
+ implementation group: 'com.hivemq', name: 'hivemq-mqtt-client-proxy', version: '1.2.0'
104
+ implementation group: 'com.hivemq', name: 'hivemq-mqtt-client-epoll', version: '1.2.0'
105
+ implementation group: 'com.hivemq', name: 'hivemq-mqtt-client-reactor', version: '1.2.0'
72
106
}
73
107
```
74
108
@@ -90,7 +124,44 @@ NOTE: You have to set the compiler version to `1.8` or higher.
90
124
<dependency >
91
125
<groupId >com.hivemq</groupId >
92
126
<artifactId >hivemq-mqtt-client</artifactId >
93
- <version >1.1.4</version >
127
+ <version >1.2.0</version >
128
+ </dependency >
129
+ </dependencies >
130
+ ...
131
+ </project >
132
+ ```
133
+
134
+ For optional features you can choose to include additional modules:
135
+
136
+ ``` xml
137
+ <project >
138
+ ...
139
+ <dependencies >
140
+ <dependency >
141
+ <groupId >com.hivemq</groupId >
142
+ <artifactId >hivemq-mqtt-client-websocket</artifactId >
143
+ <version >1.2.0</version >
144
+ </dependency >
145
+ </dependencies >
146
+ <dependencies >
147
+ <dependency >
148
+ <groupId >com.hivemq</groupId >
149
+ <artifactId >hivemq-mqtt-client-proxy</artifactId >
150
+ <version >1.2.0</version >
151
+ </dependency >
152
+ </dependencies >
153
+ <dependencies >
154
+ <dependency >
155
+ <groupId >com.hivemq</groupId >
156
+ <artifactId >hivemq-mqtt-client-epoll</artifactId >
157
+ <version >1.2.0</version >
158
+ </dependency >
159
+ </dependencies >
160
+ <dependencies >
161
+ <dependency >
162
+ <groupId >com.hivemq</groupId >
163
+ <artifactId >hivemq-mqtt-client-reactor</artifactId >
164
+ <version >1.2.0</version >
94
165
</dependency >
95
166
</dependencies >
96
167
...
@@ -101,13 +172,14 @@ NOTE: You have to set the compiler version to `1.8` or higher.
101
172
102
173
If you are experiencing problems with transitive dependencies, you can try the shaded version.
103
174
This version packs the transitive dependencies which are only used internal under a different package name.
175
+ The shaded version includes the websocket, proxy and epoll modules.
104
176
To use the shaded version just append ` -shaded ` to the artifact name.
105
177
106
178
#### Gradle
107
179
108
180
``` groovy
109
181
dependencies {
110
- compile group: 'com.hivemq', name: 'hivemq-mqtt-client-shaded', version: '1.1.4 '
182
+ implementation group: 'com.hivemq', name: 'hivemq-mqtt-client-shaded', version: '1.2.0 '
111
183
}
112
184
```
113
185
@@ -120,7 +192,7 @@ dependencies {
120
192
<dependency >
121
193
<groupId >com.hivemq</groupId >
122
194
<artifactId >hivemq-mqtt-client-shaded</artifactId >
123
- <version >1.1.4 </version >
195
+ <version >1.2.0 </version >
124
196
</dependency >
125
197
</dependencies >
126
198
...
@@ -141,6 +213,12 @@ repositories {
141
213
142
214
dependencies {
143
215
implementation 'com.github.hivemq.hivemq-mqtt-client:hivemq-mqtt-client:develop-SNAPSHOT'
216
+
217
+ // snapshots for optional modules
218
+ implementation 'com.github.hivemq.hivemq-mqtt-client:hivemq-mqtt-client-websocket:develop-SNAPSHOT'
219
+ implementation 'com.github.hivemq.hivemq-mqtt-client:hivemq-mqtt-client-proxy:develop-SNAPSHOT'
220
+ implementation 'com.github.hivemq.hivemq-mqtt-client:hivemq-mqtt-client-epoll:develop-SNAPSHOT'
221
+ implementation 'com.github.hivemq.hivemq-mqtt-client:hivemq-mqtt-client-reactor:develop-SNAPSHOT'
144
222
}
145
223
```
146
224
@@ -163,13 +241,44 @@ dependencies {
163
241
<version >develop-SNAPSHOT</version >
164
242
</dependency >
165
243
</dependencies >
244
+
245
+ <!-- snapshots for optional modules -->
246
+ <dependencies >
247
+ <dependency >
248
+ <groupId >com.github.hivemq.hivemq-mqtt-client</groupId >
249
+ <artifactId >hivemq-mqtt-client-websocket</artifactId >
250
+ <version >develop-SNAPSHOT</version >
251
+ </dependency >
252
+ </dependencies >
253
+ <dependencies >
254
+ <dependency >
255
+ <groupId >com.github.hivemq.hivemq-mqtt-client</groupId >
256
+ <artifactId >hivemq-mqtt-client-proxy</artifactId >
257
+ <version >develop-SNAPSHOT</version >
258
+ </dependency >
259
+ </dependencies >
260
+ <dependencies >
261
+ <dependency >
262
+ <groupId >com.github.hivemq.hivemq-mqtt-client</groupId >
263
+ <artifactId >hivemq-mqtt-client-epoll</artifactId >
264
+ <version >develop-SNAPSHOT</version >
265
+ </dependency >
266
+ </dependencies >
267
+ <dependencies >
268
+ <dependency >
269
+ <groupId >com.github.hivemq.hivemq-mqtt-client</groupId >
270
+ <artifactId >hivemq-mqtt-client-reactor</artifactId >
271
+ <version >develop-SNAPSHOT</version >
272
+ </dependency >
273
+ </dependencies >
166
274
...
167
275
</project >
168
276
```
169
277
170
278
Change the artifact name to ` hivemq-mqtt-client-shaded ` to get snapshots of the shaded version.
171
279
172
- JitPack works for all branches and also specific commits by specifying in the version.
280
+ JitPack works for all branches and also specific commits.
281
+ Just specify ` <branch>-SNAPSHOT ` or the first 10 digits of the commit id in the version.
173
282
174
283
## General principles
175
284
0 commit comments