The function currently requires an ICollection<string>, but doesn't actually depend on the ICollection<string> interface. Relax the requirement to be IEnumerable<string> for better flexibility.
* Topic templates: Ensure parameter values are checked for wildcard
* Topic templates: Complement extension methods
- add template.BuildMessage()
- add subscribeOptionsBuilder.WithTopicTemplate()
* Topic templates: switch some samples to use a topic template
The changes should be self-explanatory and are
intended to provide more examples.
* Topic templates: add README
* Add support for changing the protocol type on socket level
* Do not set NoDelay when not supported by protocol
* Update release notes
* Fix release notes
* DISCONNECT packet should allow zero-length body
> [If the Remaining Length is less than 1 the value of 0x00 (Normal disconnection) is used.](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901208)
* Update release notes and add comment
---------
Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>
* fix: time out and cancel propagation in managed client
* Update release notes
* Refactor code
---------
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* rethrow MqttClientUnexpectedDisconnectReceivedException when Publish errors out because server disconnects the client and QoS is 0
* use a local var to cache _unexpectedDisconnectPacket
* Add inner exception to new exception
* Update release notes
* set the default inner exception as null
---------
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Add MqttTopicTemplate
The topic template class is a way to deal with dynamic topics that
is less cumbersome and error-prone than String.Format or
other string fu one might use to handle dynamic topics.
Example:
MyCity/{street}/{crossing}/lights
'street' and 'crossing' would be parameters.
The class and its extension methods are intended to support
dynamic subscription/publication, message-topic matching and
routing. The template syntax is modelled after the well-known
moustache syntax, which conincidentally is also published
as the 'AsyncAPI channel address expressions'.
* Add MQTTnet.Extensions.TopicTemplate to solution
* Apply code style from team shared resharper settings.
Add missing file headers.
* Update release notes
---------
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Move "Client is not connected" error to it's own exception
* Update MqttClientNotConnectedException.cs
* Update release notes
---------
Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>
* See the issue #1862
Adding an event when ManagedMqttClient actually subscribe/unsubscribe to topics.
This event has to be used in parallel with connected event to know the exact state.
* Rename SubscriptionsResultAsync to SubscriptionsChangedAsync.
* Rename internal field for event
* Update ReleaseNotes.md
---------
Co-authored-by: Pierre Dufrene <pierre.dufrene@se.com>
Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>