MQTT in Processing
... and finally, we can implement a Processing-based app which can also connect to the MQTT broker and exchange messages with all other connected devices. The library to use in this case is the MQTT library by Joel Gaehwiler shown in Figure 8.
You can use the example sketch at Joel's GitHub page to test the connection. Obviously, you will need to connect to the Raspberry Pi WiFi network for this to work.