Closed YiuTerran closed 2 years ago
client.subscribeWith().topicFilter(xxx)
.qos(MqttQos.AT_LEAST_ONCE)
.callback(this::onDeviceEvent)
.executor(executor).send
It seems that using a ThreadPoolExecutor
here, is a good practice. Is it right?
OK, i noticed the same subscribe callback is called sequentially.
So i should wrap the callback in a threadpool.
Here, I recommend designing a param for if message order matters.
It seems the document for Thread Management can't be found yet.
I want to increase comsuming speed of subscribed topics.
Any suggestions? Just increase
NettyThreads
param, or create new netty exec pool for the client?