Skip to content

formentor-studio/projecting-contents-with-magnolia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Projecting contents with Magnolia CMS

This repository shows how to project contents from Magnolia CMS to Kafka.

Features

Content

magnolia-projections-webapp

Bundle of Magnolia 6.4.0

content-projection

Magnolia module implementing the projection of contents from Magnolia to Kafka.

magnolia-projections-consumer

Spring Boot service that consumes projections from Kafka produced by Magnolia

Usage

  1. Deploy Kafka broker and Schema registry

Starts broker listening to localhost:9092 and Schema registry listening to http://localhost:8081

$ docker compose up -d
  1. 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
  1. Setup Kafka broker and Schema registry. If necessary

config

  1. 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)
  1. 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

About

Projection of contents from Magnolia CMS to Kafka

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages