OSDC 2015 | Jan Piet Mens MQTT for your Data Center and for the loT

okay welcome back everybody lunch break and welcome our next speaker amp it means can you hear me properly yep hello good afternoon my name is JP or yang Beach or whatever and I’m here to tell you a little bit about a protocol called MQTT MQTT by the way is not is no longer in a view an abbreviation used to be but it is no longer it just stands for for that MQTT so what is MQTT MQTT is a standard it’s been standardized at Oasis it’s protocol the pub sub publish-subscribe messaging transport and we’ll be looking a lot at that publish-subscribe an amount which was originally designed for unreliable networks for example mobile networks if you think of any mobile device that you might have with you when I show you in a moment an example they use actually uses MQTT these things are terribly unreliable because you you run into Wi-Fi you go into the next wife are you going to 3G you going to 0 G into 4G etc know you’re offline etc so MQTT is very good for that by the way this this bottle of whatever it is white chocolate sauce the picture is a little bit surprising maybe but I put that there because it’s called 1883 and 1883 is the designated tcp port for MQTT so MQTT is a transport protocol it can carry binary payloads of up to 256 megabytes when I say up to 256 megabytes I mean that of course but if you consider that MQTT was really originally designed for the Internet of Things little microcontrollers then of course it’s idiotic to think that these little micro controllers that might have whatever a kilobyte megabyte or no 8 kilobytes of flash will be able to to actually process 256 megs but in theory it would be possible MQTT is very fast and as I think I already said it’s lightweight ideally suited to low bandwidth high latency networks and it is lightweight by that i mean the protocol itself is very lightweight for example compared to http which is rather verbose protocol where you have a lot of a lot of additional payload in the headers won’t status hydras etc MQTT can be extremely interesting there MQTT has built-in security namely TLS the artist formerly known as SSL but please don’t call it that it doesn’t mean call that for ten years it’s called TLS MQTT supports authentication supports eccles access control lists some or certain implementations support TLS psk appreciate key which is very interesting sort of low-level authentication and of course at any moment you can encrypt the payload that you transport over MQTT as long as the publisher the PERS the sending side and the subscriber the receiving side agree on this encryption obviously MQTT knows three so-called qualities of service these qualities of servers define how a particular message is transported from sender from publisher to subscribe we have quality of service 0 at most once let’s sort of a little bit but a little bit like you like UDP a UDP Datagram you fire off and if it gets her it’s good it might get there twice or three times and MQTT runs over TCP but still there’s no guarantee that a Q is zero message will actually arrive it could also arrive more than once or not at all for many things more than sufficient for example if you have a little sensor that is collecting data once every second or once every two seconds or 10 seconds you might very well be a fine with that sensor not delivering a particular measurement at a certain time if on the other hand as out showing you using MQTT perhaps or monitoring the house and so on then that will be a little bit more a little bit dangerous we have qos one which is assured delivery that means the protocol itself guarantees that the message will arrive at least once careful at least once it could arrive two or three times and qos to is once only has of course quite a bit of overhead we have four transactions going back and forth but the protocol guarantees that this message will arrive exactly once by the way in between if you have questions just fire off so what else we have we

have keep-alive timers in other words the connection between clients and the central server or our monitored we have a very very cool feature called last will and testament or LWT last will and testament means the following any client that connects an MQTT server which officially is called the broker can say if i die would you please on my behalf publish this information to all other clients that are listening at the moment now we’ll be demonstrating that gentleman so upon initial Connection we are able to in a client set the last will and testament which will be published by the broker in the case that we are disconnected switch off disconnected network wise whatever which is absolutely brilliant for things like monitoring we have decoupled senders and receivers here on the left if you see the laser dot we have a publisher and this publisher is publishing messages which are currently being read by three subscribers and at any point in time an additional or more subscribers can come in and pick up the stata do something with it or go away yeah so a decoupling between senders and recipients however typically if a subscriber is not there it will typically will see a case where there is not whether that does not happen will typically not receive published messages the exception is if a client has a specific ID and the publisher publishes and q is greater 0 then those messages will appear and we have something called durable or retained messages and that is a client that is publishing the payload on particular address will be able to say please dear broker dear server keep this store this message as the last known good so any publisher can publish a retained message and that is stored and when a subscriber subsequently comes online it will immediately get when it subscribes that particular kind of message it will immediately get that last one retained message do not please confuse this with permanent storage in a kind of cue like you would see with amqp this is just the last message that is retained on a topic basis pops up messages in MQTT are addressed by topic names and a topic name is a hierarchical construct which uses utf-8 and also supports wildcards a topic can have a length I forgotten I think the new standard defines 64 kilobyte which should be more than enough for most purposes anyway and these are examples of a topic so we have here temperatures large rooms large living that could be a topic as well as we could have in another sensor publishing a temperature / bedroom / whatever and topics come and go topics MQTT topics do not need to be configured they don’t need to be defined a broker which is configured to allow that will accept any message on any topic and a subscriber who is available who is listening to that particular topic will then get that topic access control permitting wildcards of which they are to the hash symbol and a plus symbol the house specifies that level and any below whereas the plus symbol stands for exactly one level so this topic a subscriber to devices / harsh would get any messages which are published two devices / help me phone / samsung devices / computer / my laptop yeah in any depth of of hierarchy where as a subscriber who is published to a pic upon who subscribes to finance plus euro rate would get financed google euro rate finance yahoo your rate finance net ways euro rate etc okay so 11 live alone and wild cards are only allowed during subscription not during publication was there a question there somewhere cheers this is how I see MQTT name Katie t we have a cauldron we have a big bowling

pot of soup and messages are published into this quadrant any amount of messages on any amount of different topics and subscribers can just go in and fish out what they want for example suppose you have again I’m talking a little bit about sensors at the month because I’m going to show you a sensor and suppose you have a temperature sensor that you’ve set up or built a configured or both or whatever and it publishes to topical temperature cells use the temperature in celcius here I’m not that beautiful um so you have a sensor publishing at temperature / Celsius now you have a customer or you have an application that don’t know why but once Fahrenheit you could very easily write a small client application which grabs into this quadrant pics our temperatures has / Celsius I need a different example and converts that to Fahrenheit and publishes back in again under the topic temperature / Fahrenheit okay so any client any application who is actually allowed to ACL lives can grab into the spot take things out put things back in the server component of MQTT is called a broker and they’re different kinds of brokers show you two in a moment and this is so this is the server part of MQTT and the way the way we see it or the way I see it is you have a broker somewhere in your in your network and you have like an MQTT message bus and clients subscribers publishers whatever can access this bus and connect to each other via this broker now there are there is there are two brokers that are quite popular first of all is a project called mosquito careful double teen the fly thing has just won t this is em gee that’s not Scott mosquito was divine was designed and it’s maintained by a man called Roger light it’s written in C very fast quite lightweight supports Echols has plugin for access control plug in infrastructure for access control supports TLS supports TLS psk preciate Keys has bridging support i’ll explain in a moment that means does logging by a dollar sisal i’ll also show you what that means and roger was kind enough to accept my pestering and since version 1 dot 4 which is has been out now for a few weeks supports web sockets and i’ll demonstrate what that actually means so much quito very very nice if you want to install mosquito and you are on debian or don’t take mosquito from the original Debian what’s called apt repository you’ll get version 0 15 or something don’t forgot sex on user roger has on mesquite org has repositories for centos for Debian etc with the newest versions please please use that you’ll be really very unhappy otherwise another interesting project is high mq careful this is not open source but if I recall correctly it’s free to use for so in so many concurrent clients it’s written in Java has a very interesting plug-in architecture has the feature which is called clustering which mosquito unfortunately it doesn’t have supports modules what’s the first broker at least to my knowledge that had WebSocket support yeah very very nice written by the by our friends over at hive mq who really know their know their stuff so i mentioned the doll assist topic and alice’s topic is not really standardized but most brokers use it or at least most workers i know use it and this is just as an example it’s a topic in MQTT topic so if you’re allowed to you can subscribe to this topic and the broker publishes here automatically publishes statistics about itself so for example when i took this I had 1771 clients apparently because the topic assists broker clients total okay since broker messages received 3.6 million since broker bytes sent 38 million sis broker version is mosquito version 1.4 etc so you get statistics which are updated which is of course interesting for monitoring I’ve if I recall correctly also has the Cystic brokers can be bridged together abridged

means sort of loosely coupled or not so loosely coupled and so supposing we have an MQTT broker in our first data center we have a publisher we have a client now which is connected to this broker and we have here in the second data center we have a second MQTT broker we can bridge these two and we can decide which is important from a firewall perspective we can decide does a connect to be or does be connect to a from what side does a TCP connection come from and we can define particular topic branches which are bridged which are sort of copied over from one broker to another broker so using an architecture like bridging here we can actually cause a publisher in data center one to be talking to a subscriber and data center to okay over to brokers or more than to a broker’s this works over any amount gets confusing after a bit but it’s works over any amount of bridges very very interesting also for failover reasons etc so let’s look shortly at the client utilities these are utilities that come with the mosquito package we have mosquito sub and we have mosquito pub subscribe and publish which both have any number of options the I think important ones I’ve mentioned here we have mosquito sub- T topic ok so that runs in one window for example and then you have mosquito tub and that gets a topic specifier and with- a payload I’ll show you what it looks like an amount and the minus our switch that will tell the broker to please retain this message so languages any number of languages I think a mosquito bite sorry and qtt bindings for all languages sharp java python of course lua see anything a small example Justin Python because that’s my favorite scripting language we import a module and then we publish MQTT don’t single topic name payload and if we had a sub running simultaneously connected to localhost which is reading topic conf / hash we are publishing to con flash hello we will see the message come in and thanks to the minus V switch we see here first blank separated the topic on which something is published and then the payload okay I think it’s that’s easy enough the subscription in an API is slightly more complex because of the a synchronicity so we set up callbacks connect callback for example where we then do the actual subscribe and we set up a message call back which will be fired whenever MQTT gets a message whenever this client gets a message will be fired and we then connect to our broker here on localhost sport 1883 specify a keep a lifetime and there we have an asynchronous sorry a synchronous client which is subscribing to a particular topic that’s the topic conf / + and if we run this client I beg your pardon if we run this client hook it’s running down you and we publish to come / thirsty you recall I go back amount we’re reading were subscribed to con flash plus a 1 level on the conference we publish to conf thirsty beer time then this client gets on that topic that payload con / catering coffee is ready as payload then we get on that topic the appropriate paleo and we can of course react to this modified remember said earlier take Celsius temperature modified fahrenheit published back that’s it now MQTT is used in a large number of really practical applications alerting metering electricity metering for example there a number of implementation if lusco is one there’s a company called remake electric in sweden who make professional sort of high-grade electricity metering systems

which use MQTT to publish their data logging systems show you in a moment grey log location awareness this for example is our very own tracks application and it shows last time I’ll I went to Brighton it shows these red pins and these red bins were dropped by MQTT pubs publishers which were fired of via mobile device automation a lot lighting and controlling host monitoring show you one example in a moment so there they are quite a number of practical solutions IBM is has already developed a connected car prototype we have a vehicle that sends out information for example accident sends a route via MQTT instead of using HTTP and cone so one practical application is a program called MQTT warren which we wrote because we realize well first of all we realize that everybody the first thing people do is when they learn how to use and qtt is they want to use it for alerting and so host is down alert oh let me quickly create an MQTT to twitter program or let me quickly create an MQTT to icinga or an MQTT to mail etc and we we saw that and I realized that because I’ve done at least 10 of those myself so without her how about we do this properly and out came MQTT warned now the reason I’m showing this is because I’m going to demonstrate it in a slightly different context so MQTT Warren is a client written in Python which connects in MQTT broken subscribes to any number of topics and you configure for each topic for each topic branch how you want to handle the payloads should jason be decoded is a plain text etc etc etc and these payloads you you you hand over to plugins we have I think at the moment 40 plugins for mail and XBMC and Twitter and push over and troll and what’s the Android n ma I think it’s called notify my android and all these kinds of services we have a golf plug-in I just saw bent we have a golf plug in that sense the gray log although that’s absolute in the meantime we have an NSC a and nsca and csa and NSC a plug-in Thank You which I’ll show you in a moment with it talks to I think our or the other thing whatever it’s called em and we can store in files you can republish by omggg etc so this is sort of a general purpose swiss army knife kind of republish ER it subscribe to something can modify payloads can transform them and pushes them out elsewhere and i thought well how am i going to show you this and sorry i designed a temperature sensor and i’m thinking in there are many data centers many areas where you want to sense temperature temperature goes up careful warning temperature goes down too much careful warning so design the temperature sensor and for that i chosen arduino now what you see there on the screen is lying here ok arranged slightly differently but the same components and I thought if temperature sensor how on earth i’m going to demonstrate that temperature rises in temperature goes down I don’t want to sort of breathe on to it or light up a cigarette lighter so instead of the actual sensing being temperature I use a potentiometer and with that I can very quickly up and down the the temperature so we have here this Arduino clone which is connected via ethernet or the true true there excuse me that thing on the top is just power supply because I frizzled out the power supply here and we have here a buzzer and an LED okay so what will now do can you can you read that up there what will now do is subscribe 22 MQTT and i’m subscribed to a topic called clients / arduino / hash or asterisk asterisk and as you can see something’s happening it’s I’m getting publishers oh I’m sorry that’s my laser pointer I’m getting publishers can show you which start with the topic clients i’m going to show you anyway it the laser put out escape sequence clients arduino IP address of the temperature sensor celsius and then comes a certain amount a certain temperature in degrees

ok now let me raise the temperature and i will do it quickly this is a microcontroller $10 $15 microcontroller talking MQTT to a mosquito broker I am NOT able to flood the connection okay right so we have a microcontroller which is transmitting once every can remember five seconds transmitting a temperature measurement not only once every five seconds but also as soon as the temperature changes slightest degree cup we fire off a MQTT publish which is received by the broker and this publish is transmitted then to all listening clients to all subscribers one subscriber is this webpage now this webpage pardon the design it’s not my speciality and this webpage has a number of things on it first of all it has this this this temperature whatever you call it then it shows their 12 degrees and that seems to correspond to that and it has here in IP address that’s the IP address of this sensor of that little hard we know and there’s a red something here and then what you see here which flashes every few seconds that is a frame frame were just talking to a help me with a formulation with were the with what it is which is talking to an icinga host which tells me what the temperatures ok now the the magical part of this web page is a bunch of JavaScript which you don’t see here which is speaking MQTT over web sockets oh sorry after green which is speaking MQTT over WebSocket so this web page is de facto connected to that mosquito broker if that is true then if I change the temperature something must happen here right so you see I am also here and look at it that thing when we left the dial change is the thing on the top change is the little wood thing and the middle changes i copy pasted everything I could find into this page mmm it’s cool so I change the temperature sensor and yeah you laugh okay now this is red thing this red button I’m going to click that I was going to click with my laser pointer but that I’m not able to let me click that did you hear it right and you didn’t see it because it’s lying on the desk can you see that yeah anyway it lights up okay believe me please now what’s the magical thing about this the metrical thing about this is this web page which is actually subscribed to an MQTT topic yeah apparently is also able to speak to that controller because that buzzer it’s not the bell on my mac that buzzer is actually physically attached to the Arduino furthermore the lead is also the LED is also physically attached to the Arduino now let me see if I can arrange the screens in such a way I can’t No now let me show you what happens when I press that red thing and I’m going to abort this here for a second so I press that little red knob on the top and that caused an MQTT published over WebSocket to the MQTT broker which in turn sent it out to the client well to any subscribing client and what actually happened is I’m a bit afraid of touching my lead can you if you look at the first publish on the top there you will see the I hope you can read it you will see that a new published was sent out to clients / arduino / LED / command with

payload one so I’m sending out to anybody who’s listening please turn on lead the microcontroller does that but has it actually done that we want feedback so what actually happens up there is the microcontroller switches on the lid and then reports back on a different topic otherwise you quickly go to loop reports back on a different topic lead on the web page on the right receives that MQTT published led on yeah that one there and changes the color of the button okay so we literally have a feedback from a microcontroller not cool I think school right but I actually want to show you something else so we were talking about MQTT warned now MQTT warned i’m starting it here is also a subscriber to this brought to this broker and it’s listening to the same topic and here i’m seeing a log in the back there and it’s showing me the temperature if I up the temperature the changes right now let’s add to em QT to warn let’s add an additional plugin eight 9 okay it’s just a voice plugin right shut up hmm now we’re going to do the following we’re going to send MQTT Warren is now doing the following it is again subscribing to the stop it receives the payload and sense the pay load off here to the log and second of all to icing over the nsca plugin now this is a bit slow that’s because of NS cas anything to do with icing or an amputee t so I’m going to quickly up the temperature and it’ll take a while you see here now suddenly it’s very slowly pushing it forward the reason is this communication with NSA via nsca is a bit too but we ought to be seeing I hope it works we ought to be seeing here on the bottom right status information that a single showing us that the temperature is changing I said we ought to know 30 mistype yeah with auto some things that perhaps the I think I running on a vm is dead I’m sorry for some reason this is not working come on 21 not to raise the 27 I think I’m terribly sorry I think I think we I think a thing at the at the other end as collapse anyway it doesn’t really matter um so we have this little title yo but we have a client or a number of clients actually subscribe to the broker we have this as a client was mosquito sub conducted as a client we have MQTT one connected as a client we have this webpage connected as a client and these all these clients subscribe to the same payloads the same topics and do something with the data that they’re gonna that are getting now I also mentioned that there’s something called last will and testament now what I’m going to do is to pull the plug on this microcontroller I’m just going to remove the the power ok I’m going to hit enter here so you see something happening I’m sorry about that not use them i signaled a model checking amount i’d go into hold

on plan and suddenly out of the blue comes a a public now this publish goes to clients arduino and then the IP address of this particular arduino now the reason this comes out of the blue is when the microcontroller when the arduino code start it up it said to the broker here is my last will and testament and this last will and testament you please publish on my behalf when i die when you don’t hear from me anymore or any longer in within a within our keep alive a time odd please publish this information this payload on my behalf the payload is 0 the payload is 0 because that’s the payload I defined it to be yeah I defined that on this branch we have a zero or one if the appropriate client is on oral or is off so let me kill this client here and we started now strangely remember the plug is still off now strangely I got three messages I subscribed as a client to clients are really no hash and I’ve got three messages the first message is the last will and testament got a zero and the second message is Celsius 17 what kind of messages could these be they were retained they were published in a retained form in other words the broker was instructed to please keep the last value so by doing this we can have client for example which queries what is the temperature in our data center and we get back 17 now this is not one hundred percent precise because our temperature sensor has just died but it is the last known good value okay so instead of not getting anything we’re getting something that we can approximate so last 17 okay maybe the temperature still okay let us now plug in the center again give it a pivot power and the first thing it will do why doesn’t this thing work the first thing it will do is to publish on on this same topic it removes 20 and publishers who retained one so it is now actually online and it has simultaneously told the broker in the case of my death please publish this last will and testament on my behalf any questions over I beg your pardon no there is no no protocol component that will tell me when something happened if I want to know that I would embed that in my payload so for example we could publish a JSON payload containing the Celsius temperature and the time Sam and a timestamp yeah but no there is no I can’t other than by looking at logs I can’t find out when something was published that’s not possible you had a question it depends on the broker mosquito yes supports client of a TLS client certificate was a authentication oh yes of course because but careful once again broker specific i’m the broker i’m most familiar with is mosquito the open source mosquito broker which is also what I’m using here and yes there you can you can you can say for example you can configure a client certificate results and this username or in this client name and based on this client ID or in this user name please use this access control list but careful just because mosquito supports it does not necessarily mean that your clients supported for example the MQTT library for arduino which was written by nick larry has no support for TLS because on on 8k flash whatever how many bit microcontroller they’re just not cpu enough for that yeah but if you took an embed for example if you took a beagle bone or raspy or whatever then of course ever lots of things become possible yeah but on a tiny micro controller you should not expect support for TLS i’m not sure i’m not sure i will check

later on come to me and i’ll check I’m not hand % sure it auto yes because lets the underlying openssl library I’m not on a percent sure I have to check so yeah and what I actually wanted to also show you you’ve been seeing it here our microcontroller came back up and is now publishing temperature okay our power was restored to it and it just boots up where it was and continues so back to the side this what we have just sort of as a as a reminder this is what we have it irks me and that’s why I’m a little bit I’m concentrated it irks me that that I think our demo didn’t work because it always works but it’s that life so this is the old good situation we had a temperature and so on and remember please this area above here is connected via web sockets to the MQTT brokers it’s literally speaking over MQTT it’s speaking to a brokerage speaking MQTT and this part at the bottom is should have been contacted via nsca so the way it the way it works is we have as I mentioned already we have our little micro controller on the left which is talking MQTT to our broker this web application is also talking impute et to the broker / WebSocket connection and we had MQTT Warren which is also connected by an MQTT subscribe to the broker and was receiving payloads which it ought to have pushed over to icing or nagios it pushed them over to whatever name is Victoria who was talking here to us and it does also other things too but in this particular case my virtual machine must attack so in the case of not good this is what you should have seen there on the kids are not good we have critical and then we saw I didn’t I think I didn’t point it out but we saw or you should have seen the IP address here on the top turn red which is of course facilitated by this last will and testament that a client publishes and we can query that we can subscribe to those last will and testament and then react you know alert somebody we start something we start the service etc this is why one of the one the main reasons apart from all the lightweight business although MQTT one of the main reasons why I say it’s excellent for monitoring because we are informed very very quickly that for example the machine has died and as a result of this critical something I can’t show you in this environment but as a result of this critical a an MQTT publish was fired off by a singer or would have been fired off by a singer so not an email but an MQTT publish which is again picked up by for example a subscriber like MQTT one and that results in push over notification which has to be confirmed here this is push over and we see critical Adreno temperature vaio MQTT so and so for critical temperature 31 degrees celsius yeah and we could send off by email etc etc etc so basically using this MQTT bus this MQTT broker we can have different clients reacting to something instead of configuring an email plugin or twitter plugin or whatever notification plugin in your monitoring system you would configure something a little bit more generic like example in MQTT bus push it all out and you can have at any time different clients listening to that reacting to it on and handling for example things like notifications quite dynamic yeah where else is MQTT in use well it’s used quite heavily for example our friends over at greylock I’ve create an MQTT plug-in which will ensure it subscribe to any amount of topics and store in grey log used to be called greylock to its cool grey lock them in grey log the payloads of this those publishers and here’s an example there’s an example screenshot with individual fields sort of parse out of the out of the JSON or of the Gulf beaver ansible has MQTT notified plugins for example you have RabbitMQ the mqp broker which hasn’t am I looking for a plug-in the connector

or vertical which has MQTT support collect d we were talking about adding MQTT to collect d you know for collectively the statistics generator to publish an art fire collecti and florian started on that and i soldered on that and also the people starter than that and that’s why it’s it’s not it’s sort of in in light grey because it I’ve lost the track I don’t think it’s completed which could very well be my fault oppa map the home the open home automation broker has MQTT support very very well for example github the Sun Italian github has MQTT support when you you can add all sorts of notifications to get up as soon as a commit comes in and one of their push notifications is MQTT you can connect it to your own broker Wireshark has fluke so I mentioned earlier and we make electrically the power of things Jenkins as MQTT plugin for example this all sorts of all sorts of different yeah unix programs all sorts of different applications that have MQTT and i bet that no lots of you I don’t but that that lots of you already have MQTT in your pocket who uses I can’t raise my hand who uses Facebook right facebook Messenger also congratulations they use MQTT the facebook Messenger used to be used to run on HTTP they did HTTP GET and post requests and they change several years back now I think 23 years back to MQTT and by doing so they have I forget the exact statistics but if they’ve conserve battery power on mobile phones on smart devices by quite a large amount they have reduced latency they seem to be very very happy with their use of MQTT now that must mean something because I believe I’m not quite sure but i believe facebook has a few more customers than many of us do so they probably know what they’re doing yeah facebook facebook Messenger runs MQTT below the below the hood I big one no I don’t know I don’t know that that has never been that has never been published I could well assume that they wrote their own yeah the protocol is not particularly difficult I’ve never thought about it but I would assume they’ve done a row and sort of to integrate in their own services if you want to broker that really does a lot of stuff IBM cells appliances forget the name they do 15 million messages per second so that’s quite quite good it’s not particularly um yeah for all things MQTT I would like to recommend MQTT org as a starting point that’s it that’s what I wanted to show you do we have time for questions are there any questions yeah you need a library for JavaScript there is a eclipse project called PAHO and the power whole eclipse project has for example the ref I think the reference implementation of the Java is probably what you guys took for greylock I’m not sure though because I don’t know anything about Java they have the reference implementation of the JavaScript MQTT library which is very good it absolutely sucks that they refuse to call a topic a topic but that they call it a destination name if you can live with that then it’s very good I’ve never I’ve never broken it and we have we have in a different project in the on-track project we have quite a lot of web soccer things and it’s just unbreakable yeah so aho JavaScript library it’s a single it’s a single dot yes would you just copy into your own thing and then that’s it yeah this the code for this I’ve got on github I can show you where it is it’s relatively relatively simple okay I think you had a question as many as like as many as you like if your client has the resources for doing that yeah yeah always remember I have to say that because I just showed

you a microcontroller yes but even even the little Audrina can connect to 23 brokers yeah there is no limitation no protocol limitation if your broker dies the bus is dead yeah that is correct well in the case of mosquito for example you will need something like a load balancer in front of it in the case if you’re using something like hive mq or message site that’s the IBM appliance if using something like I’ve mq or commercial thing like message site which is an appliance they have clustering support in it so hive mq for example you talk to one address and in the back day balance for you yeah no no mosquito currently has no high availability if mosquito dies then first of all congratulations for having managed to kill it but second of all if it dies yeah it goes away and all your clients are out in the cold yeah so you would you would in any case have to load balance it somehow to avoid that okay would it be enough to to have to mosquitoes breached and then subscribe your clients to both of them that would be a possibility certainly certainly but that is not necessarily what people mean when they think high availability okay but yeah that will be possible yeah correct whatever you like we transport things like Jason we do a lot of Jason in on tracks we’ve transported message packets by a 250 up to 256 meg binary safe so the payload is up to you and what of course is often possible is that you hide well not high because the visible but that you encode things like source addresses or client IDs and into a topic that is also possible yep but otherwise yeah the payload you’re free to do whatever you like and we put I put a foot pictures in it no problem whatever there was somebody else in yeah seguin yes quality of service to know there is no queue when a client careful I’m saying a client I’m not saying that microcontroller the code for the microcontroller for the Arduino currently does not support Kurusu when a client publishes qos to this TCP connection can go away and come back and the MQTT as a protocol guarantees delivery or exactly once okay that is no problem of course if the client publishes a message on quality of service to and at that instant dies or at that instant the broker dies well then there can’t be any guarantee if the the power fails and all data center then its offerings gone and but other than that we have and we have a nice where we have a lot of experience other than that for example in iOS big problem because if you know iOS applications that are running with background are killed away after five thousand seconds and other than that we can send Q&As to publishers from an iOS application that’s going from Wi-Fi into 2g and we guarantee well not we and critically does that we know that the that message really appears at the target broker exactly once yeah so that really will really works even if you’ve gone through areas of zero coverage that that exam Paul this here my phone doesn’t Rome I’m too stingy to pay roaming charges for data well some some of these were actually published sort of the app published them qs2 but wasn’t even connected yeah they showed up then later on and later on from there to there including check-in is about an hour and a half yeah any other questions oh I think we’re over time yeah one more question yeah yes that is extremely reliable here again because this is our bridging because we well you we define beat the the connection the MQTT connection between both brokers how these messages should be passed on quality of service 0 1 or 2 yes so we

have the same semantics on this Bridge here as we have for normal and kijiji publishes so in other words if you have some high security whatever conservation where you want that purple client to really reach that purple subscriber here you would publish qs2 here you would subscribe qs2 and here you would connect these also with quality of service to and then I’ll we’ve done it a lot must happen for that message not to reach that message I think I think everything has to be rebooted for that to happen I know that is really extremely reliable thank you very much you