Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (30 sloc) 1 KB


A Keycloak SPI that publishes events to a MQTT broker.


mvn clean install


  • Copy target/event-listener-mqtt-jar-with-dependencies.jar to {KEYCLOAK_HOME}/standalone/deployments
  • Edit standalone.xml to configure the MQTT service settings. Find the following section in the configuration:
<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">

And add below:

<spi name="eventsListener">
    <provider name="mqtt" enabled="true">
            <property name="serverUri" value="tcp://"/>
            <property name="username" value="mqtt_user"/>
            <property name="password" value="mqtt_password"/>
            <property name="topic" value="my_topic"/>

Leave username and password out if the service allows anonymous write access. If unset, the default message topic is "keycloak/events".

  • Restart the keycloak server.
You can’t perform that action at this time.