This repository shows how to project contents from Magnolia CMS to Kafka.
- Send contents to Kafka when publishing contents to public instance of Magnolia.
- Register Avro schema from content types defined in Magnolia.
Bundle of Magnolia 6.4.0
Magnolia module implementing the projection of contents from Magnolia to Kafka.
Spring Boot service that consumes projections from Kafka produced by Magnolia
- Deploy Kafka broker and Schema registry
Starts broker listening to localhost:9092 and Schema registry listening to http://localhost:8081
$ docker compose up -d- Build and deploy Magnolia
$ cd magnolia-projections
$ mvn clean package
$ cp magnolia-projections/magnolia-projections-webapp/target/ROOT.war /PATH_TO_TOMCAT_10/webapps
$ sh /PATH_TO_TOMCAT_10/bin/startup.sh- Setup Kafka broker and Schema registry. If necessary
- Project content from content app Tours
It produces a message to topic tour which is the name of the content type referenced by content app Tours
map = new java.util.LinkedHashMap<String, String>()
map.put("path", "/magnolia-travels/Vietnam--Tradition-and-Today")
map.put("repository", "tours")
cm = info.magnolia.commands.CommandsManager.getInstance()
cm.executeCommand('projection', 'publish', map)- Start consumer of projections
Starts spring boot service listening to port 8082 that prints messages from topic tour
$ cd magnolia-projections-consumer
$ mvn clean package
$ mvn spring-boot:run