This is very rough proof of concept code of a DSpace event consumer that sends a message to a JMS topic when an item is made live in DSpace.
Written for DSpace 6.
There are two classes - the actual event consumer and a data model class that holds very basic data about the DSpace item. This is used in the consumer to generate a JSON message corresponding to the model class.
Add the two classes to the additions module, change dspace.cfg as shown in the diff, and add two dependencies to the additions module pom:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>3.2.16.RELEASE</version>
</dependency
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>5.14.3</version>
</dependency>
As presented at Open Repositories 2017.