Replies: 1 comment 2 replies
-
here is the minimal stuff you want, assuming you are connecting to "127.0.0.1:14567"
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've created a new discussion because the previous one #14415 (comment) was getting to cluttered to address my issues using emqtt. I sincerely hope I don't annoy the maintainer and the contributors to he emqtt application.
In this discussion I want to point the results of using these functions in the emqtt client I currently building
quic_connect/1
open_quic_connection/1
quic_mqtt_connect/1
The following snippet is part of the module I've create you will find attached to this discussion. In this snippet the connPid is return value of emqtt:start_link/1.
Result of using emqtt:quic_connect(ConnPid)
Result of using emqtt:open_quic_connection(ConnPid)
Result of using emqtt:quic_mqtt_connect(ConnPid)
As you can see from the three tests above
For the last function call emqtt:quic_mqtt_connect(ConnPid) If I had created a clientID it would have been shown. If you would like to create your own this link explains how
I've been informed that the generation of a ConnPid is dependent on a ClientID and for this reason it automatically generated by emqtt. Perhaps it is stored somewhere in emqx, but it certainly does not show up in emqtt's Option list where I'm assuming it should be.
In my next tests I will show the results of subscribing topics from the broker. I can start with subscriptions because I have a EK9160 Bus Coupler that automatically publishes data to the broker from devices connected to its input slaves. I have conducted tests with connection functions emqtt:open_quic_connection(ConnPid) and emqtt:quic_mqtt_connect(ConnPid) since in my case they don't kill the emqtt process when connecting to the broker. Here is the snippet of code I will be using for his test
Subscription test after connecting with emqtt:open_quic_connection(ConnPid)
Subscription test after connecting with emqtt:quic_mqtt_connect(ConnPid)
Both test fail with an error report and then hang. Of the two test however the one using emqtt:open_quic_connection(ConnPid) seems to be working better than the one with emqtt:quic_mqtt_connect(ConnPid). In the one with emqtt:open_quic_connection(ConnPid) it could be that the data is being published but I don't know how to access it to print it.
I've conducted these tests with the hope that someone in the eqmtt team can suggest ways in how I correct my subscription code.
Thank you
com2.zip
Beta Was this translation helpful? Give feedback.
All reactions