Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple connection middleware from MQTTnet.AspnetCore #756

Open
davidfowl opened this issue Sep 18, 2019 · 7 comments
Open

Decouple connection middleware from MQTTnet.AspnetCore #756

davidfowl opened this issue Sep 18, 2019 · 7 comments
Labels
feature-request New feature or request

Comments

@davidfowl
Copy link
Member

Describe the feature request

As part of .NET Core 3.0, we've exposed some client /server networking abstractions (see dotnet/aspnetcore#10308) that were made to serve as a foundation for projects like this build on top of. The MQTT layer should support a very thin way to wire up the MqttConnectionHandler with a way to write logic to handle messages (decoupled from the underlying transport).

MQTTnet.AspnetCore should expose the web specific wire up.

@davidfowl davidfowl added the feature-request New feature or request label Sep 18, 2019
@SeppPenner
Copy link
Collaborator

@JanEggers This is something that might be worth a look when you do #464 once 3.0 is released.

@davidfowl
Copy link
Member Author

More information here https://github.com/davidfowl/BedrockTransports

@JanEggers
Copy link
Contributor

@davidfowl thx for pointing it out. I will have a look once 3.0 is out.

are there any official packages besides kestrel that implement these abstractions?

like a tls middleware, a tcp server or a tcp client because that are the parts that are lacking today.

without these implementations I see no reason not to depend on kestrel directly.

@JanEggers
Copy link
Contributor

@davidfowl also setup looks a bit hacky. you should really rewrite that stuff to depend on service collection and maybe generic host.

so you can:

new HostBuilder()
.AddConnections()
.AddTcp() or AddWebSocket() or AddKestrel() or AddTransportXXXX
.AddTls()
.AddMqtt()
.Build()
.RunAsync()

@davidfowl
Copy link
Member Author

That’ll be a separate assembly.

@JanEggers
Copy link
Contributor

@davidfowl im happy to adopt just let me know when there are shipped bits / things I can use without installing a preview version of vs / sdk

@chkr1011
Copy link
Collaborator

@JanEggers Could you please have a look if here is something to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants