Closed UgoTran closed 1 year ago
Hi @UgoTran - Unfortunately I don't understand the question. Could you expand or rephrase your question with specifics, code examples and what you are trying to do?
Hi @UgoTran since we haven't heard back I'll close out this issue soon. If you still need help let us know!
I'm back! i mean, the snip code of an other mqtt-client, that lib support Subscribe a topic by annotation programming style( @MqttSubscribe("topic_name") ).
So, your hivemq-client can be support like that?
Welcome back @UgoTran! Great to hear from you.
I think this is what you are looking for: https://github.com/SmartsquareGmbH/mqtt-starter
Aside from that 3rd party project, we don't provide an annotation based API directly in this library.
If that project doesn't help, let me know and we can file this as a feature request that we may be able to add eventually.
Hi @UgoTran - I will close out this issue. But if anything remains, feel free to re-open or file another issue. Thanks for pointing this out!
Problem or use case
Currently, i copy code snip on hivemq-client document to connect, Publish, subscribe
Preferred solution or suggestions
Snip code
@MqttSubscribe("test_a") public void sub(String topic, MqttMessage message, @Payload String payload, @UserProperties Map properties, @CorrelationData String data) { log.info("receive from : {}", topic); log.info("message payload : {}", new String(message.getPayload(), StandardCharsets.UTF_8)); }
Another demo code: https://github.com/tocrhz/mqtt-spring-boot-starter