ãããã¯ãŒã¯ã®äžå®å®ããåæã«æ©ãŸãããããšãªããDurable Sessionsã掻çšããŠãããã€ã¹ãæ¥ç¶ç¶æ ã«ä¿ã¡ãããŒã¿ãä¿è·ããã·ã¹ãã ã®ããã©ãŒãã³ã¹ãæ倧åããŸãããã
ãããã¯ãŒã¯ã®äžå®å®ããåæã«æ©ãŸãããããšãªããDurable Sessionsã掻çšããŠãããã€ã¹ãæ¥ç¶ç¶æ ã«ä¿ã¡ãããŒã¿ãä¿è·ããã·ã¹ãã ã®ããã©ãŒãã³ã¹ãæ倧åããŸãããã
MQTTã匷åã«è£å®ãããããã³ã«ãšããŠãé·è·é¢éä¿¡ãšäœé»åæ¶è²»ã§ç¥ãããLoRaãããã³ã«ã¯ãåºåIoTå±éã«ãããŠå®å®ãã€ã³ã¹ãå¹æã®é«ãéä¿¡ãœãªã¥ãŒã·ã§ã³ãæäŸããŸãã
æ¬ããã°ã§ã¯ãè€æ°ã®å 端æè¡ã掻çšããŠãç£æ¥ããã€ã¹ããããŒã¿ãåã蟌ã¿ããšããžã§åŠçããå¹ççã«ä¿åããåæãå¯èŠåããå®å šãªããŒã¿ãã€ãã©ã€ã³ãæ§ç¯ããå®éã®IoTãããžã§ã¯ãã®å®è£ ã«ã€ããŠè©³è¿°ããŸãã
EMQãšF5ã®å ±åãœãªã¥ãŒã·ã§ã³ã¯ãEMQXãã©ãããã©ãŒã ã®é«ãåææ¥ç¶æ§ãšF5ã®å é²çãªããŒããã©ã³ã·ã³ã°ã»ã»ãã¥ãªãã£æè¡ãçµã¿åãããã¹ã±ãŒã©ãã«ã§é«æ§èœãªããŒã¿ã¢ã¯ã»ã¹ãœãªã¥ãŒã·ã§ã³ãæäŸããŸãã
ãã®èšäºã§ã¯ãäž»ã«Electronãããžã§ã¯ãã§ã®MQTTã®äœ¿çšæ¹æ³ã«ã€ããŠçŽ¹ä»ããã·ã³ãã«ãªMQTTãã¹ã¯ãããã¯ã©ã€ã¢ã³ããå®æãããã¯ã©ã€ã¢ã³ããšMQTTãããŒã«ãŒéã®æ¥ç¶ããµãã¹ã¯ãªãã·ã§ã³ãã¢ã³ãµãã¹ã¯ãªãã·ã§ã³ãã¡ãã»ãŒãžã³ã°ãªã©ã®æ©èœãå®è£ ããŸãã
ãã®ããã°ã§ã¯ãM2MQTTãUnityã§äœ¿çšããããã®ã·ã³ãã«ãªUnity3dãããžã§ã¯ããæäŸããŸãããããžã§ã¯ãã«ã¯ããããŒã«ãŒãžã®æ¥ç¶ç®¡çãã¡ãã»ãŒãžã³ã°ã®ãã¹ãçšã®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ãåããäŸã®ã·ãŒã³ãå«ãŸããŠããŸãã
ãã®ããã°ã§ã¯ãQt6ã§ã·ãŒã ã¬ã¹ãªéä¿¡ãè¡ãããã«MQTTã䜿çšããã¹ããããã€ã¹ãããã®ã¬ã€ããæäŸããŸãã
ãã®èšäºã§ã¯ãMQTTã®éåæã¡ãã»ãŒãžé ä¿¡ãã¬ãŒã ã¯ãŒã¯äžã§ã®ãªã¯ãšã¹ãïŒã¬ã¹ãã³ã¹ãã¿ãŒã³ã®å®è£ æ¹æ³ã«ã€ããŠãMQTT 5.0ã®æ°æ©èœã掻çšããªãã詳ãã解説ããŸãã
ãããã¯ãšã€ãªã¢ã¹ã䜿çšãããšããŠãŒã¶ãŒã¯é·ããŠç¹°ãè¿ã䜿çšãããå¯èœæ§ã®ãããããã¯åã2ãã€ãã®æŽæ°ã«ççž®ã§ãããããã¡ãã»ãŒãžãçºè¡ããéã®åž¯åå¹ æ¶è²»ãåæžã§ããŸãã
ãã®èšäºã§ã¯ãMQTTnetã©ã€ãã©ãªã䜿çšããŠãµãŒããŒã¬ã¹ã®MQTTãããŒã«ãŒã«æ¥ç¶ããæ¹æ³ã説æããŸãããããžã§ã¯ãå šäœã®ã³ãŒãã¯MQTT Client ExamplesããããŠã³ããŒãã§ããŸãã
å ±æãµãã¹ã¯ãªãã·ã§ã³æ©èœã¯ MQTT 5.0 ã§å°å ¥ãããå®éçšã§åºã䜿çšãããŠããŸãããã®èšäºã§ã¯ãå ±æãµãã¹ã¯ãªãã·ã§ã³ã«çŠç¹ãåœãŠããã®ä»çµã¿ãšãŠãŒã¹ã±ãŒã¹ã«ã€ããŠè©³ãã解説ããŸãã
ãã®èšäºã§ã¯ãMQTTãããã³ã«ã®ã»ãã·ã§ã³ã¡ã«ããºã ãšãã»ãã·ã§ã³ã©ã€ããµã€ã¯ã«ã管çããããã«äœ¿çšããã2ã€ã®æ¥ç¶ãã©ã¡ãŒã¿ã§ããã¯ãªãŒã³ã¹ã¿ãŒããšã»ãã·ã§ã³æå¹æéééã«ã€ããŠçŽ¹ä»ããŸãã