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

use quic example code to connect to mq over tcp fail #126

Open
gavinshao111 opened this issue Nov 21, 2022 · 3 comments
Open

use quic example code to connect to mq over tcp fail #126

gavinshao111 opened this issue Nov 21, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@gavinshao111
Copy link

Describe the bug
In quic demo, connect mq over tcp fail.

Expected behavior
Connect successful.

Actual Behavior
Connect fail.

To Reproduce

** Environment Details **

  • NanoSDK/NNG version
  • Operating system and version
  • Compiler and language used
  • Shared or static library
  • Remote MQTT Broker info
    mqx config:
    listeners.tcp.default {
    bind = "0.0.0.0:1883"
    max_connections = 1024000
    }
    listeners.quic.default {
    enabled = true
    bind = "0.0.0.0:14567"
    max_connections = 1024000
    }
  • Messaging scenario

Additional context
connect mqtt-tcp://10.192.8.158:1883 fail, but connect to mqtt-tcp://10.192.8.158:14567 successful, console output:

[panzhao@localhost quic]$ ./quic_client conn mqtt-tcp://10.192.8.158:1883
QUIC Stream closed, pipe finit!
[Disconnected][CLIENT FOR QUIC]...
^C
[panzhao@localhost quic]$ ./quic_client conn mqtt-tcp://10.192.8.158:14567
[Msg Sent][CLIENT FOR QUIC]...
[Connected][CLIENT FOR QUIC]...
^C
[panzhao@localhost quic]$ ./quic_client conn mqtt-quic://10.192.8.158:14567
[Msg Sent][CLIENT FOR QUIC]...
[Connected][CLIENT FOR QUIC]...

@JaylinYu JaylinYu changed the title use quic connect to mq over tcp fail use quic example code to connect to mq over tcp fail Nov 24, 2022
@JaylinYu
Copy link
Member

Seems like it still goes into QUIC transport layer. Need your client code to proceed

@wanghaEMQ
Copy link
Member

Thanks for your issue.

In quic client. It seems that we do not check the scheme(mqtt-tcp or mqtt-quic) before it goes to quic transport layer. So you can connect to mqtt broker over quic (on 14567 port).

But quic client is NOT supported to connect to mqtt broker over tcp (on 1883 port) if you don't modify the codes therein.

We will fix the scheme check problem at later. And if you want to connect mqtt broker over tcp. You could use mqtt or mqtt_async example.

@JaylinYu
Copy link
Member

nng_mqtt_quic_client_open doesn't check scheme now

@JaylinYu JaylinYu added enhancement New feature or request and removed Investigation labels Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants