spring-integration icon indicating copy to clipboard operation
spring-integration copied to clipboard

Investigate concurrency support for the MqttPahoMessageDrivenChannelAdapter

Open artembilan opened this issue 6 years ago • 2 comments

Affects Version(s): <Spring Integration version>


artembilan avatar Jan 25 '19 20:01 artembilan

Does this open issue mean that the current implementation of MqttPahoMessageDrivenChannelAdapter is single threaded?

luisfranciscob avatar Nov 11 '21 08:11 luisfranciscob

The underlying Paho Client is single-threaded. It does have two loops:

  1. CommsReceiver.run() to read data from the MqttInputStream - mostly messages for the subscibed topics.
  2. CommsCallback.run() to deliver those messages from an in-memory queue to the subscribed listeners in the application.

So, generally speaking: we always get delivery for all the topic we have subscribed in a single thread. That's technically a point of this issue: to be able to distribute topics subscription between concurrency configured.

artembilan avatar Nov 11 '21 15:11 artembilan