Hi Baptiste, Thanks a lot for the quick reply. Please find the snapshot of the TCP dump for MQTT publish message.
[image: Inline image 1] Please note that the MQTT messages are carried on top of TCP. Also, as mentioned in previous mail, I am trying to load balance the traffic based on the topic mentioned in the MQTT message( 3rd line from end ) which means that all the traffic corresponding to a particular topic should be forwarded to a specific server only. So considering above requirement, I have the following questions : 1. Is MQTT already supported as an out of box feature? 2. Is there a configurable hook/plugin through which above can be achieved? 3. If no configuration/plugins are available, how easy it would be to add the feature/code in order to retrieve payload information from TCP packets and parse it as par MQTT? 4. What are main modules which I should look into in order to implement the same in case not yet implemented? Please let me know for any further clarification. Regards, Sourav On Thu, Sep 10, 2015 at 7:58 PM, Baptiste <[email protected]> wrote: > On Thu, Sep 10, 2015 at 4:05 PM, Sourav Das <[email protected]> > wrote: > > Hi, > > > > I have been going through the HAProxy documentation for my work which > deals > > with scaling and load balancing for MQTT Brokers. > > > > However, I could not find any configuration regarding the Client Affinity > > where the routing of the MQTT traffic is done based on the topic present > in > > the MQTT message. As MQTT is also carried over TCP, is it possible to > use a > > pre-configured hook in HAProxy so that the traffic can be routed to the > > appropriate server based on the MQTT topic. > > > > At present I am not able to find out any hook which enables this to be > done. > > I am a bit curious to know whether the support of MQTT is planned in > future > > releases of HAProxy. > > > > > > Please let me know if this makes sense. > > > > Regards, > > Sourav > > > Hi Sourav, > > This would be doable only if the information can be retrived from the > payload of the first request sent by the client. > could you provide more information about how MQTT protocol works? Is > there any server banner? > A simple TCP dump containing an example of the message you want to > route would be appreciated and allow us to deliver you an accurate > answer. > > Baptiste >

