Skip to content

4.5.0 Release

Compare
Choose a tag to compare
@acoburn acoburn released this 16 Dec 16:00

The 4.5.0 release of fcrepo-camel adds several new features and removes other deprecated features. This release is incompatible with earlier releases in the following ways:

  • The transform endpoint option has been removed
  • The tombstone endpoint option has been removed
  • The RdfNamespaces class has been removed
  • The JmsHeaders class has been removed

Rather than rely on message headers published by Fedora's message broker, users are encouraged to rely on the message body. Message headers will not be part of the forthcoming Fedora messaging specification, plus the JMS headers (e.g. org.fcrepo.jms.identifier) are tied to the use of a particular message broker technology (as opposed to, say, Kafka or AMQP).

To make it easier for users to process the message body produced by Fedora, a new processor class has been added: EventProcessor. This processor will convert the content of a message from JSON-LD into Camel-specific headers. Camel code should rely on those headers, which include:

FCREPO_URI or "CamelFcrepoUri"
FCREPO_EVENT_TYPE or "CamelFcrepoEventType"
FCREPO_RESOURCE_TYPE or "CamelFcrepoResourceType"
FCREPO_DATE_TIME or "CamelFcrepoDateTime"
FCREPO_AGENT or "CamelFcrepoAgent"
FCREPO_EVENT_ID or "CamelFcrepoEventId"

Of these, the following are List types and may have multiple values: FCREPO_EVENT_TYPE, FCREPO_RESOURCE_TYPE, FCREPO_DATE_TIME.

Note, that FCREPO_BASE_URL and FCREPO_IDENTIFIER are not included here. Those values are still supported by the FcrepoCamelComponent, but users are encouraged to make use of the CamelFcrepoUri header instead.

A typical pattern with this code would be:

from("direct:start")
    .process(new EventProcessor())
    .filter(header(FCREPO_EVENT_TYPE).contains(RESOURCE_CREATION))
      .to("fcrepo://localhost?accept=application/ld+json")
      .unmarshal().json(Jackson)
      .to("direct:handle");

Here the value of CamelFcrepoUri is used to fetch the resource from Fedora and not "http://localhost". This follows the pattern of other Camel components such as camel-http4.

This release includes updates to many underlying dependencies, such as fcrepo-java-client (v.0.2.1), Jena (v. 3.1.1) and Camel (v.2.18.0). It has been tested with Karaf 4.x.