0 Replies Latest reply on Jul 20, 2016 2:43 PM by F P

    Integrating a Wildfly hosted app (Keycloak) with ActiveMQ

    F P Newbie

      Hello everyone,


      I am currently in the process of integrating Keycloak (2.0.0) with ActiveMQ (5.13.3) so that I can pass messages to an LDAP server, instead of going directly from Keycloak to LDAP.


      I followed this (How to Use Out of Process ActiveMQ with WildFly) link to add the ActiveMQ resource adapter as a module first, but had some difficulties with that. After that, I included the activermq-rar.rar as a standalone deployment, which worked. Upon startup of the Keycloak server (which is hosted via Wildfly), I see status reports of it being loaded.


      My problem is the following: I have Java-based *standalone* client endpoints where I would like to basically consume the messages that Keycloak produces (authentication/authorization, user creation, role change/creation, etc.), and pass them to an LDAP server using ActiveMQ.


      I also followed the last post described here ([KEYCLOAK-2302] Add sending Keycloak events as JMS messages - JBoss Issue Tracker)  where one of the developers gives a 'workaround'. I added the embedded server configuration (using standalone.xml however, since that is what Keycloak uses as well), and got the topic to show up during Keycloak start up.


      My question is: how do I get the Context, and messages with a given topic, from a Wildfly hosted application (in this case Keycloak) which already has an ActiveMQ adapter set up (also shown on the Deployment page of Wildfly), from within a standalone Java Client? Communication to my back end is fairly easy, but I simply cannot find a straightforward post that could help me.


      Any help is greatly appreciated. I'm not at work right now, so I can't post my module.xml or standalone.xml right now, but if they're required I'll get to it first thing in the morning.