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

Wildcard in example is not displaying message anymore #71

Closed
deNiklaus opened this issue Nov 17, 2020 · 3 comments
Closed

Wildcard in example is not displaying message anymore #71

deNiklaus opened this issue Nov 17, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@deNiklaus
Copy link

Description of the problem

Since Version 1.11.0 the wildcard-part of the example from the libary is not displaying messages anymore.

Topics without wildcard work perfectly.
Subscribing with the wildcard is working (Debugging shows incoming messages).

Problem: The function in the example to print the received topic and the message doesn't do anything.

Versions

  • ESPMQTTClient lib: 1.11.0     (no problem in 1.10.2)
  • PubSubClient lib: 2.8.0
  • Arduino ESP32 core: 1.0.4

Hardware

  • Board type : ESP32
  • Board model : Dev Module

C++ code

In the example file "SimpleMQTTClient" the following printing of messages from the wildcard-subscription is not doing a thing:

  client.subscribe("mytopic/wildcardtest/#", [](const String & topic, const String & payload) {
    Serial.println(topic + ": " + payload);
  });

Logs

...
MQTT >> [mytopic/wildcardtest/hello] test-payload-for-problem-topic
MQTT >> [mytopic/test] test-payload-without-wildcard
test-payload-without-wildcard

Here you see, both topics were received and are visible with the debugging-option.
However the wildcard-topic does not trigger its Serial.println().

@deNiklaus deNiklaus added the bug Something isn't working label Nov 17, 2020
@plapointe6
Copy link
Owner

Thanks for reporting this issue. It seems that the QOS functionnality I added with 1.11.0 broke the wildcard. I will publish a fix soon.

plapointe6 pushed a commit that referenced this issue Nov 17, 2020
@plapointe6
Copy link
Owner

The fix has been published with release 1.11.1. Thanks

@RobotGrrl
Copy link

Hi @plapointe6, Is this fix supposed to work by updating the library to v1.11.1 in the Arduino libraries manager? I have just tried it, and still not getting the callback function called on a subscribed topic with a # in it. The messages are received, as visible by the debugging-option, but it never calls the callback function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants