Skip to content

Commit

Permalink
v4.0.0 (#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
chkr1011 authored Feb 20, 2022
1 parent 47e674e commit 2ce9b94
Show file tree
Hide file tree
Showing 608 changed files with 21,393 additions and 18,449 deletions.
3 changes: 0 additions & 3 deletions .bettercodehub.yml

This file was deleted.

64 changes: 1 addition & 63 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,63 +1 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
* text=auto
21 changes: 16 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ assignees: ''

---

### Verification

Before opening a bug make sure that the following conditions are met.
<!-- Remove this chapter when all conditions are met. -->

1. Performance issues are also appearing in RELEASE mode of your application.
2. An increased memory consumption or high CPU load also happens when your application runs in RELEASE mode AND logging is DISABLED.
3. Client issues with not received messages, connection drops etc. can be reproduced via another client application like "MQTTnetApp" (https://github.com/chkr1011/MQTTnetApp) or similar.
4. The bug also appears in the VERY LATEST version of this library. There is no support for older version (due to limited resources) but pull requests for older versions are welcome.

### Describe the bug
A clear and concise description of what the bug is.

### Which project is your bug related to?
<!-- Remove the items which don't apply from the following list -->
### Which component is your bug related to?
<!-- Remove the items which don't apply from the following list. -->
- Client
- ManagedClient
- MQTTnet.Server standalone
- RcpClient
- Server
- Generic

### To Reproduce
Steps to reproduce the behavior:
Expand All @@ -39,7 +48,9 @@ Include debugging or logging information here:
\\ Put your logging output here.
```
### Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Please provide full code examples below where possible to make it easier for the developers to check your issues.

**Ideally a Unit Test (which shows the error) is provided so that the behavior can be reproduced easily.**

```csharp
\\ Put your code here.
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
We have joined the .NET Foundation!

Version 4 comes with a new API so a lot of breaking changes should be expected.
Checkout the upgrade guide (https://github.com/dotnet/MQTTnet/wiki/Upgrading-guide) for an overview of the changes.
Checkout the new samples (https://github.com/dotnet/MQTTnet/tree/feature/master/Samples) how to use the new API. The wiki only remains for version 3 of this library.

* [Core] Improved memory management when working with large payloads.
* [Core] Added support for .NET 6.0.
* [Core] nuget packages are now created by MSBuild including more information (i.e. commit hash).
* [Client] Exposed socket linger state in options.
* [Client] The OS will now choose the best TLS version to use. It is no longer fixed to 1.3 etc. (thanks to @patagonaa, #1271).
* [Client] Added support for _ServerKeepAlive_ (MQTTv5).
* [Client] Exposed user properties and reason string in subscribe result.
* [Client] Exposed user properties and reason string in unsubscribe result.
* [Client] Migrated application message handler to a regular .NET event (BREAKING CHANGE!).
* [Client] The will message is longer a regular application message due to not supported properties by the will message (BREAKING CHANGE!).
* [Client] Timeouts are no longer handled inside the library. Each method (Connect, Publish etc.) supports a cancellation token so that custom timeouts can and must be used (BREAKING CHANGE!).
* [Server] Exposed socket linger state in options.
* [Server] Added support for returning individual subscription errors (#80 thanks to @jimch)
* [Server] Improved topic filter comparisons (support for $).
* [Server] Added more MQTTv5 response information to all interceptors (BREAKING CHANGE!).
* [Server] Improved session management for MQTT v5 (#1294, thanks to @logicaloud).
* [Server] All interceptors and events are migrated from interfaces to simple events. All existing APIs are availble but must be migrated to corresponding events (BREAKING CHANGE!).
* [Server] Removed all interceptor and event interfaces including the delegate implementations etc. (BREAKING CHANGE!).
* [Server] Renamed a lot of classes and adjusted namespaces (BREAKING CHANGE!).
* [Server] Introduced a new queueing approach for internal message process (packet bus).
* [Server] For security reasons the default endpoint (1883) is no longer enabled by default (BREAKING CHANGE!).
80 changes: 57 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,68 @@
name: CI

on: [push]
on: [push, pull_request]

env:
ASSEMBLY_VERSION: "4.0.0.${{github.run_number}}"
NUGET_VERSION: "4.0.0.${{github.run_number}}"

jobs:
build:

runs-on: windows-latest
strategy:
matrix:
dotnet-version: ['6.0.x']
runs-on: windows-2022

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/[email protected]
- name: Setup Windows SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1
with:
sdk-version: 18362

- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: ${{ matrix.dotnet-version }}
dotnet-version: |
3.1.x
6.0.x
- name: Setup MSBuild
uses: microsoft/[email protected]

- name: Build
shell: pwsh
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Signing Certificate
run: |
Set-Location -Path "Build"
.\build.ps1 1.2.3 4.5.6-rc1
# - name: Install dependencies
# run: dotnet restore MQTTnet.sln
# - name: Build
# run: dotnet build --configuration Release --no-restore MQTTnet.sln
# - name: Test MQTTnet
# run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj
# - name: Test AspNetCore
# run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.AspNetCore.Tests\MQTTnet.AspNetCore.Tests.csproj
$secret = '${{ secrets.SNC_BASE64 }}'
$decoded = [System.Convert]::FromBase64CharArray($secret, 0, $secret.Length)
Set-Content -Path ${{ github.workspace }}\certificate.snk -Value $decoded -AsByteStream
- name: Restore nuget packages
run: msbuild MQTTnet.sln /t:Restore /p:Configuration="Release" /verbosity:m

- name: Build solution
run: msbuild MQTTnet.sln /t:Build /p:Configuration="Release" /verbosity:m /p:FileVersion=${{ env.ASSEMBLY_VERSION }} /p:AssemblyVersion=${{ env.ASSEMBLY_VERSION }} /p:PackageVersion=${{ env.NUGET_VERSION }} /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=${{ github.workspace }}\certificate.snk

- name: Collect nuget Packages
uses: actions/upload-artifact@v2
with:
name: nuget Packages
path: |
**\*.nupkg
**\*.snupkg
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1

- name: Core Tests
run: vstest.console.exe Source\MQTTnet.Tests\bin\Release\net6.0\MQTTnet.Tests.dll

- name: ASP.NET Tests
run: vstest.console.exe Source\MQTTnet.AspNetCore.Tests\bin\Release\netcoreapp3.1\MQTTnet.AspNetCore.Tests.dll

- name: Publish MyGet nugets
if: ${{ github.event_name == 'push' }}
run: dotnet nuget push **/*.nupkg -k ${{ secrets.MYGET_API_KEY }} -s https://www.myget.org/F/mqttnet/api/v3/index.json --skip-duplicate

# - name: Publish nugets
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
# run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
49 changes: 0 additions & 49 deletions Build/MQTTnet.AspNetCore.nuspec

This file was deleted.

52 changes: 0 additions & 52 deletions Build/MQTTnet.Extensions.ManagedClient.nuspec

This file was deleted.

52 changes: 0 additions & 52 deletions Build/MQTTnet.Extensions.Rpc.nuspec

This file was deleted.

Loading

0 comments on commit 2ce9b94

Please sign in to comment.