Giter Club home page Giter Club logo

quarkus-1.5.0-mqtt-wildcard-problem's Introduction

Reproduce Error: MQTT subscription topic wildcard stopped working in Quarkus 1.5.0-Final

When subscribing to an MQTT topic, "+" and "#" can be used as wildcards (more details).

This works with Quarkus 1.4.2-Final but stops working when switching to Quarkus 1.5.0-Final. It still fails in Quarkus 1.5.2-Final.

Preparation

Clone project for demonstrating the error:

git clone https://github.com/buehren/quarkus-1.5.0-mqtt-wildcard-problem.git
cd quarkus-1.5.0-mqtt-wildcard-problem

Start MQTT server (Mosquitto)

docker-compose up -d

Optional: See it working with Quarkus 1.4.2-Final

git checkout master

egrep "^mp.messaging.incoming.prices.topic=" src/main/resources/application.properties
# Output:
# mp.messaging.incoming.prices.topic=#

egrep "<quarkus.*version" pom.xml
# Output:
#     <quarkus-plugin.version>1.4.2.Final</quarkus-plugin.version>
#     <quarkus.platform.version>1.4.2.Final</quarkus.platform.version>

mvn clean quarkus:dev

Every 5 seconds a line "Sending price" appears.

In another shell:

curl localhost:8080/prices/stream

Result (as expected):

  • Every 5 seconds a number appears in CURL's output.
  • In the Quarkus output, each "Sending price" line is now followed by "Receiving price".

Press CTRL+C to stop Quarkus.

See error with Quarkus 1.5.2-Final

git checkout quarkus-1.5.2

git diff master quarkus-1.5.2
# Output shows that only the Quarkus version is changed to 1.5.2

egrep "^mp.messaging.incoming.prices.topic=" src/main/resources/application.properties
# Output:
# mp.messaging.incoming.prices.topic=#

egrep "<quarkus.*version" pom.xml
# Output:
#     <quarkus-plugin.version>1.5.2.Final</quarkus-plugin.version>
#     <quarkus.platform.version>1.5.2.Final</quarkus.platform.version>

mvn clean quarkus:dev

Every 5 seconds a line "Sending price" appears.

In another shell:

curl localhost:8080/prices/stream

Result (ERROR):

  • No output appears in CURL's output.
  • In the Quarkus output, each "Sending price" line is NOT followed by "Receiving price".

Press CTRL+C to stop Quarkus.

Optional: See it working with Quarkus 1.5.2-Final - but without MQTT wildcard

git checkout quarkus-1.5.2-no-wildcard

git diff quarkus-1.5.2 quarkus-1.5.2-no-wildcard
# Output shows that only the topic wildcard in the subscription is no longer used

egrep "^mp.messaging.incoming.prices.topic=" src/main/resources/application.properties
# Output:
# mp.messaging.incoming.prices.topic=prices

egrep "<quarkus.*version" pom.xml
# Output:
#     <quarkus-plugin.version>1.5.2.Final</quarkus-plugin.version>
#     <quarkus.platform.version>1.5.2.Final</quarkus.platform.version>

mvn clean quarkus:dev

Every 5 seconds a line "Sending price" appears.

In another shell:

curl localhost:8080/prices/stream

Result (as expected):

  • Every 5 seconds a number appears in CURL's output.
  • In the Quarkus output, each "Sending price" line is now followed by "Receiving price".

BUT: MQTT subscription topic wildcards should not stop working with Quarkus 1.5!

Press CTRL+C to stop Quarkus.

Cleanup

Stop MQTT server (Mosquitto)

docker-compose down

quarkus-1.5.0-mqtt-wildcard-problem's People

Contributors

thomas-ferchau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.