Skip to content
PHP-based listeners
PHP XSLT Shell
Find file
Pull request Compare This branch is 197 commits ahead, 11 commits behind rwincewicz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
images
includes
soap_server
test
.gitignore
Derivatives.php
FedoraConnect.php
FedoraConnectStaticMethods.php
FedoraMock.php
Logging.php
README.md
TavernaCurlConnection.php
TavernaException.php
config.xml
config.xml.sample
connect.php
datacite_users.xml
fedoraConnection.php
listener.php
listener.sh
message.php
microservice_users.xml
php_listeners
phpunit.xml
sender.php
tavernaSender.php
test.php

README.md

PHP listeners

These are listeners based in PHP which use the Stomp library to connect to the Fedora JMS broker.

Currently each instance of the listeners can only listen to one repository. If you want to use a processing server to monitor more than one repository then you can set up a second listener and point it at the second repository.

Requirements

  • At least PHP 5.3

Installation instructions

Fedora server setup

1. To enable Stomp support in the embedded JMS broker download the Spring distribution from http://www.springsource.org/download and copy the .jar files in the dist directory to $FEDORA_HOME/tomcat/webapps/fedora/WEB-INF/lib.

2. Edit $FEDORA_HOME/server/config/fedora.fcfg and change the section defining the broker to this:

<param name="java.naming.provider.url" value="vm:(broker:(tcp://localhost:61616,stomp://localhost:61613))"/>

3. To the same file add a third section underneath to define another channel to send messages to:

<param name="datastore3" value="apimListenerMessages">
  <comment>A datastore representing a JMS Destination for APIM events used by the JMS listeners</comment>
</param>

4. At the bottom of this file add a third datastore section:

Messaging Destination for API-M events which update the repository A space-separated list of message types that will be delivered to this Destination. Currently, "apimUpdate" and "apimAccess" are the only supported message types. Optional, defaults to topic.

5. Restart Fedora.

6. Ensure firewall rules allow access from the listener server.

Listener server setup

1. Download the awesome tuque API from https://github.com/Islandora/tuque and ensure that it's in a sub directory called tuque.

2. Install the PHP-Pear framework and use this to install the PHP Stomp library.

3. Copy the config.xml.sample to config.xml and update it to reflect your environment.

4. Start the listener by running "php listener.php".

5. Ensure the firewall rules allow access from the Fedora server.

REST interface setup

1. Install apache.

2. Copy the listener_rest.conf file to the apache config directory and change the details to suit your environment.

3. Ensure firewall rules allow access to the REST interface port.

4. Restart apache.

Something went wrong with that request. Please try again.