ntex-mqtt 4.5.1

Client and Server framework for MQTT v5 and v3.1.1 protocols
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
# Changes

## [4.5.1] - 2024-12-04

* Check service readiness for every turn

## [4.5.0] - 2024-12-04

* Use updated Service trait

## [4.4.0] - 2024-11-10

* Check service readiness once per decoded item

* Run un-readiness check in separate task

## [4.3.1] - 2024-11-05

* Do not rely on not_ready(), always check service readiness

## [4.3.0] - 2024-11-04

* Use updated Service trait

## [4.2.1] - 2024-11-01

* Better rediness error handling

## [4.2.0] - 2024-10-31

* Call control service on readiness error

## [4.1.1] - 2024-10-15

* Disconnect on error from service readiness check

## [4.1.0] - 2024-10-10

* Do not check readiness for call

* Handle service readiness errors during shutdown

## [4.0.0] - 2024-10-05

* Middlewares support for mqtt server

## [3.1.0] - 2024-08-23

* Derive Hash for the QoS enum #175

## [3.0.0] - 2024-05-28

* Switch to individual ntex_* crates

* Use ntex-service 3.0

## [2.0.2] - 2024-05-15

* Remove non_exhaustive marker

## [2.0.1] - 2024-05-14

* Better naming

## [2.0.0] - 2024-05-1x

* Mark `Control` type as `non exhaustive`

* Rename `ControlMessage` to `Control`

* Remove protocol variant services

* Disable keep-alive timer if not configured

* Add write back-pressure to io dispatcher

## [1.1.0] - 2024-03-07

* Use MqttService::connect_timeout() only for reading protocol version

## [1.0.0] - 2024-01-09

* Release

## [1.0.0-b.0] - 2024-01-07

* Use "async fn" in trait for Service definition

## [0.12.16] - 2023-12-25

* Handle QoS 0 messages when the client disconnect #164

* Use io tags

## [0.12.15] - 2023-12-10

* Fix KEEP-ALIVE timer handling

## [0.12.14] - 2023-12-03

* Optimize KEEP-ALIVE timer

## [0.12.13] - 2023-11-29

* Refactor io timers

## [0.12.12] - 2023-11-25

* Fix keep-alive timeout handling

## [0.12.11] - 2023-11-23

* Refactor slow frame timeout handling

## [0.12.10] - 2023-11-21

* Remove slow frame timer if service is not ready

## [0.12.9] - 2023-11-17

* Do not process data in read buffer after disconnect

## [0.12.8] - 2023-11-12

* Use new ntex-io apis

## [0.12.7] - 2023-11-04

* Fix v5::Subscribe/Unsubscribe packet properties encoding

## [0.12.6] - 2023-10-31

* Send server ConnectAck without io flushing

## [0.12.5] - 2023-10-23

* Fix typo

## [0.12.4] - 2023-10-03

* Fix nested error handling for control service

## [0.12.3] - 2023-10-01

* Fix Publish and Control error type

## [0.12.2] - 2023-09-25

* Drop unneeded HandshakeError::Server

## [0.12.1] - 2023-09-25

* Change handshake timeout behavior (renamed to connect timeout).
  Timeout handles slow client's Control frame.

## [0.12.0] - 2023-09-18

* Refactor MqttError type

## [0.11.4] - 2023-08-10

* Update ntex deps

## [0.11.3] - 2023-06-26

* Update BufferService usage

## [0.11.2] - 2023-06-23

* Fix client connector usage, fixes lifetime constraint

## [0.11.1] - 2023-06-23

* `PipelineCall` is static

## [0.11.0] - 2023-06-22

* Release v0.11.0

## [0.11.0-beta.3] - 2023-06-21

* Use ContainerCall, remove unsafe

## [0.11.0-beta.2] - 2023-06-19

* Fix Dispatcher impl, poll Container<S> instead of S

## [0.11.0-beta.1] - 2023-06-19

* Use ServiceCtx instead of Ctx

## [0.11.0-beta.0] - 2023-06-17

* Migrate to ntex-0.7

## [0.10.4] - 2023-05-12

* Expose size of prepared packet

* Return packet and packet size from decoder

## [0.10.3] - 2023-04-06

* Adds non-blocking qos1 publish sender

* Adds validation of topic filters in SUBSCRIBE and UNSUBSCRIBE (#136)

## [0.10.2] - 2023-03-15

* Sink readiness depends on write back-pressure

## [0.10.1] - 2023-01-31

* Fix missing ready wakes up from InFlightService

* Register Dispatcher waker when service is not ready

## [0.10.0] - 2023-01-24

* Change ConnectAck session_expiry_interval_secs type to Option<u32>

* Introduce EncodeError::OverMaxPacketSize to differentiate failure to encode due to going over peer's Maximum packet size

## [0.10.0-beta.3] - 2023-01-20

* Revert builders refactoring

## [0.10.0-beta.2] - 2023-01-20

* Fix dispatcher leak during stop process

* Refactor client error

* Drop derive_more dep

* Exposed QoS at crate's level, disbanded types module

* Added v5::Sink::force_close()

* Added v5::Client::into_inner()

* packet properties with clear defaults per spec are represented without Option, use default when absent; for example, Session Expiry Interval, Maximum QoS, Retain Available, etc. in Connect and ConnectAck

* server-level settings for Maximum QoS, Topic Alias Maximum and Receive Maximum are now applied at ConnectAck construction. Any changes to ConnectAck in Handshake service are honored on connection level.

* Setting RETAIN on PUBLISH when CONNACK stated `Retain Available: 0` triggers Protocol Error

* Setting Subscription Identifier on SUBSCRIBE when CONNACK stated `Subscription Identifier Available: 0` triggers Protocol Error

* Topic name with `+` or `#` in it will trigger Protocol Error

* Protocol violation errors are now grouped under opaque ProtocolViolationError

* Removed Client re-export under v3 module. Use v3::client::Client instead.

## [0.10.0-beta.1] - 2023-01-04

* Migrate to ntex-0.6

* Use thiserror::Error for error definitions

## [0.10.0-beta.0] - 2022-12-28

* Migrate to ntex-service 1.0

## [0.9.2] - 2022-12-16

* v5: Fix topic alias handling #122

* v3: Allow to change outgoing in-flight limit

* v3/v5: Fix sink inflight messages handling after local codec error #123

## [0.9.1] - 2022-11-17

* v5: allow omitting properties length if it is 0 in packets without payload regardless of reason code or its presence.

## [0.9.0] - 2022-11-01

* Rename `Level` to `TopicFilterLevel` for better spec compliance

* v5: Use correct reason code for MaxQosViolated error #117

## [0.9.0-b.2] - 2022-10-28

* v3/v5: MqttSink::ready() is not ready until CONNACK get sent to peer

## [0.9.0-b.1] - 2022-10-17

* Remove deprecated methods

## [0.9.0-b.0] - 2022-10-10

* Renamed Topic into TopicFilter, TopicError into TopicFilterError
* Changes to topic filter validation: levels starting with `$` are allowed at any level and are recognized as system
  only at first position
* Changes to topic matching logic: when topic filter is matched against another topic filter via TopicFilter.match_filter(),
  left hand side topic filter must be strict superset of all topics allowed with topic filter on right hand side
* Changes to topic matching logic: having `+/#` in the end of topic filter does not wrongly recover failed match on `+` level
* Validation is now part of TopicFilter instantiation, e.g. it is impossible to create non-validated topic filter from
  set of Levels.
* Level API is removed completely as level itself is not a valuable concept.

## [0.8.11] - 2022-10-07

* v3/v5: Allow to create `PublishBuilder` with predefined Publish packet

* v3: Allow to specify max allowed qos for server publishes

* v5: Check max qos violations in server dispatcher

## [0.8.10] - 2022-09-25

* Add .into_inner() client's helper for publish control message

## [0.8.9] - 2022-09-16

* v3: Send disconnect packet on sink close

* v3: Treat disconnect packet as error on client side

## [0.8.8] - 2022-08-22

* Allow to get inner io stream and codec for negotiated clients

* Remove inflight limit for client's control service

* v3: Add Debug trait for client's ControlMessage

## [0.8.7] - 2022-06-09

* v5: Encoding missing will properties: will_delay_interval_sec, is_utf8_payload, message_expiry_interval, content_type, response_topic, correlation_data, user_properties

## [0.8.6] - 2022-05-05

* v5: Account for property type byte in property length when encoding Subscribe packet

* v5: Add Router::finish() helper method, it converts router to service factory

* v3/v3: Clearify session type for Router

## [0.8.5] - 2022-04-20

* v3: Make topic generic type for MqttSink::publish() method

* v5: Correct receive max value for v5 connector when broker omits value #100

## [0.8.4] - 2022-03-14

* Add support in-flight messages size back-pressure

* Refactor handshake timeout handling

* Add serializer and deserializer derive (#89)

* Correct spelling of SubscribeAckReason::SharedSubsriptionNotSupported and DisconnectReasonCode::SharedSubsriptionNotSupported (#93)

* Removed PubAckReason::ReceiveMaximumExceeded as this error code is only valid for DISCONNECT packets (#95)

* Update subs.rs example to use confirm instead of subscribe (#97)

## [0.8.3] - 2022-01-10

* Cleanup v3/v5 client connectors

## [0.8.2] - 2022-01-04

* Optimize compilation times

## [0.8.1] - 2022-01-03

* Cleanup MqttError types

## [0.8.0] - 2021-12-30

* Upgrade to ntex 0.5.0

## [0.8.0-b.6] - 2021-12-30

* Update to ntex-io 0.1.0-b.10

## [0.8.0-b.5] - 2021-12-28

* Shutdown io stream after failed handshake

## [0.8.0-b.4] - 2021-12-27

* Use IoBoxed for all server interfaces

## [0.8.0-b.3] - 2021-12-27

* Upgrade to ntex 0.5 b4

## [0.8.0-b.2] - 2021-12-24

* Upgrade to ntex-service 0.3.0

## [0.8.0-b.1] - 2021-12-22

* Better handling for io::Error

* Upgrade to ntex 0.5.0-b.2

## [0.8.0-b.0] - 2021-12-21

* Upgrade to ntex 0.5

## [0.7.7] - 2021-12-17

* Wait for close control message and inner services on dispatcher shutdown #78

* Use default keepalive from Connect packet. #75

## [0.7.6] - 2021-12-02

* Add memory pools support

## [0.7.5] - 2021-11-04

* v5: Use variable length byte to encode the subscription ID #73

## [0.7.4] - 2021-10-29

* Expose some control plane type constructors

## [0.7.3] - 2021-10-20

* Do not poll service for readiness if it failed before

## [0.7.2] - 2021-10-01

* Serialize control message handling

## [0.7.1] - 2021-09-18

* Allow to extract error from control message

## [0.7.0] - 2021-09-17

* Update ntex to 0.4

## [0.7.0-b.10] - 2021-09-07

* v3: add ControlMessage::Error and ControlMessage::ProtocolError

## [0.7.0-b.9] - 2021-09-07

* v5: add helper methods to client control publish message

## [0.7.0-b.8] - 2021-08-28

* use new ntex's timer api

## [0.7.0-b.7] - 2021-08-16

* v3: Boxed Packet::Connect to trim down Packet size
* v5: Boxed Packet::Connect and Packet::ConnAck variants to trim down Packet size

## [0.7.0-b.6] - 2021-07-28

* v3/v5: Fixed nested with_queues calls in sink impl

## [0.7.0-b.5] - 2021-07-15

* v3/v5: PublishBuilder::send_at_least_once initiates publish synchronously

* v3/v5: Publish::take_payload() replaces payload with empty bytes, returns existing

## [0.7.0-b.4] - 2021-07-12

* v3: avoid nested borrow_mut() calls in sink on puback mismatch

## [0.7.0-b.3] - 2021-07-04

* Re-export ClientRouter, SubscribeBuilder, UnsubscribeBuilder

## [0.7.0-b.2] - 2021-06-30

* v3: Remove special treatment for "?" in publish's topic

## [0.7.0-b.1] - 2021-06-27

* Upgrade to ntex-0.4

## [0.6.9] - 2021-06-17

* Use `Handshake<Io>` instead of `codec::Connect` for selector

## [0.6.8] - 2021-06-17

* Add coonditional mqtt server selector

## [0.6.7] - 2021-05-17

* Process unhandled data on disconnect #51

* Fix for panic while parsing MQTT version #52

## [0.6.6] - 2021-04-29

* v5: Fix reason string encoding

* v5: Allow to set reason and properties to SUBACK

## [0.6.5] - 2021-04-03

* v5: Add a `packet()` function to `Subscribe` and `Unsubscribe`

* upgrade ntex, drop direct futures dependency

## [0.6.4] - 2021-03-15

* `HandshakeAck::buffer_params()` replaces individual methods for buffer sizes

## [0.6.2] - 2021-03-04

* Allow to override io buffer params

## [0.6.1] - 2021-02-25

* Cleanup dependencies

## [0.6.0] - 2021-02-24

* Upgrade to ntex v0.3

## [0.5.0] - 2021-02-21

* Upgrade to ntex v0.2

## [0.5.0-b.5] - 2021-01-25

* Upgrade to ntex v0.2-b.7

## [0.5.0-b.4] - 2021-01-23

* Use ntex v0.2-b.5 framed types

## [0.5.0-b.3] - 2021-01-21

* v5: Flush io stream before disconnect

## [0.5.0-b.2] - 2021-01-20

* v5: Restore `set_properties` sink method

## [0.5.0-b.1] - 2021-01-19

* Use ntex 0.2

## [0.4.7] - 2021-01-13

* v5: Add ping and disconnect support to default control service

## [0.4.6] - 2021-01-12

* Use pin-project-lite instead of pin-project

## [0.4.5] - 2021-01-12

* v5: Check publish service readiness error

* io: Fix potential BorrowMut error in io dispatcher

## [0.4.4] - 2021-01-09

* Fix public re-exports

## [0.4.3] - 2021-01-09

* Fix out of bounds panic

## [0.4.2] - 2021-01-05

* Better read back-pressure support

## [0.4.1] - 2021-01-04

* Use ashash instead on fxhash

* Drop unneeded InOrder service usage

## [0.4.0] - 2021-01-03

* Refactor io dispatcher

* Rename Connect/ConnectAck to Handshake/HandshakeAck

## [0.3.17] - 2020-11-04

* v5: Allow to configure ConnectAck::max_qos value

## [0.3.16] - 2020-10-28

* Do not print publish payload in debug fmt

* v5: Create topic handlers on firse use

## [0.3.15] - 2020-10-20

* v5: Handle "Request Problem Information" flag

## [0.3.14] - 2020-10-07

* v3: Fix borrow error in sink impl

## [0.3.13] - 2020-10-07

* Allow to set packet id for sink operations

## [0.3.12] - 2020-10-05

* v5: Add helper method Connect::fail_with()

* v5: Better name SubscribeIter::confirm()

## [0.3.11] - 2020-09-29

* v5: Fix borrow error in MqttSink::close_with_reason()

## [0.3.10] - 2020-09-22

* Add async fn `MqttSink::ready()` returns when there is available client credit.

## [0.3.9] - 2020-09-18

* `ControlMessage` (v3/v5) and referenced types have `#[derive(Debug)]` added

* Add `Deref` impl for `Session<_>`

* v5: Do not override `max_packet_size`, `receive_max` and `topic_alias_max`

## [0.3.8] - 2020-09-03

* Fix packet ordering

* Check default router service readiness

* v5: Fix in/out bound frame size checks in codec

## [0.3.7] - 2020-09-02

* v5: Add PublishBuilder::set_properties() helper method

* v3: Fix PublishBuilder methods

## [0.3.6] - 2020-09-02

* v5: Add Error::ack_with() helper method

## [0.3.5] - 2020-08-31

* v3: New client api

* v5: New client api

* v5: Send publish packet returns ack or publish error

## [0.3.4] - 2020-08-14

* v5: set `max_qos` to `AtLeastOnce` for server `ConnectAck` response

* v5: do not set `session_expiry_interval_secs` prop

## [0.3.3] - 2020-08-13

* v5: do not convert publish error to ack for QoS0 packets

## [0.3.2] - 2020-08-13

* v5: Handle packet id in use for publish, subscribe and unsubscribe packets

* v5: Handle 16 concurrent control service requests

* v3: Handle packet id in use for subscribe and unsubscribe packets

* v3: Handle 16 concurrent control service requests

* Removed ProtocolError::DuplicatedPacketId error

## [0.3.1] - 2020-08-12

* v5: Fix max inflight check

## [0.3.0] - 2020-08-12

* v5: Add topic aliases support

* v5: Forward publish errors to control service

* Move keep-alive timeout to Framed dispatcher

* Rename PublishBuilder::at_most_once/at_least_once into send_at_most_once/send_at_least_once

* Replace ConnectAck::properties with ConnectAck::with

## [0.2.1] - 2020-08-03

* Fix v5 decoding for properties going beyond properties boundary

## [0.2.0] - 2020-07-28

* Fix v5 server constraints

* Add v3::Connect::service_unavailable()

* Refactor Topics matching

## [0.2.0-beta.2] - 2020-07-22

* Add Publish::packet_mut() method

## [0.2.0-beta.1] - 2020-07-06

* Add mqtt v5 protocol support

* Refactor control packets handling

## [0.1.3] - 2020-05-26

* Check for duplicated in-flight packet ids

## [0.1.2] - 2020-04-20

* Update ntex

## [0.1.1] - 2020-04-07

* Add disconnect timeout

## [0.1.0] - 2020-04-01

* For to ntex namespace

## [0.2.3] - 2020-03-10

* Add server handshake timeout

## [0.2.2] - 2020-02-04

* Fix server keep-alive impl

## [0.2.1] - 2019-12-25

* Allow to specify multi-pattern for topics

## [0.2.0] - 2019-12-11

* Migrate to `std::future`

* Support publish with QoS 1

## [0.1.0] - 2019-09-25

* Initial release