Moquette is a Java implementation of an MQTT 3.1 broker. Its code base is small. At its core, Moquette is an events processor; this lets the code base be simple, avoiding thread sharing issues.
The Moquette broker is lightweight and easy to understand so it could be embedded in other projects. By default it lives standalone, but could be integrated into an OSGi container to create more significant integrations, for example running inside an embedded OSGi broker like Concierge.