Fedora generates event messages when a resource is created, updated or deleted.
The messages are composed for headers and body.
Message Headers
Header | Description | Sample Value |
---|---|---|
org.fcrepo.jms.user | The Fedora user who made the change. | bypassAdmin |
org.fcrepo.jms.eventID | A UUID associated with the event | urn:uuid:d0f9d030-8fac-474c-882c-0858a7f948ef |
org.fcrepo.jms.identifier | The identifier portion of the URI of the changed resource | /test1234 |
org.fcrepo.jms.timestamp | Timestamp in epoch time (milliseconds since January 1st, 1970) | 1519419333657 |
org.fcrepo.jms.baseURL | The base portion of the identifiers URI. | http://localhost:8080/rest |
org.fcrepo.jms.resourceType | A comma separated list of URIs identifying the types that describe the resource that changed. | http://www.w3.org/ns/ldp#Container,http://fedora.info/definitions/v4/repository#Resource,http://fedora.info/definitions/v4/repository#Container,http://www.w3.org/ns/ldp#RDFSource |
org.fcrepo.jms.eventType | A comma separated list of URIs identifying the event types that describe the resource that changed. | http://fedora.info/definitions/v4/event#ResourceCreation,http://fedora.info/definitions/v4/event#ResourceModification |
org.fcrepo.jms.userAgent | The type of client user agent that was used to effect the change to the resource. | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 |
Message Body
The format of the body is JSON-LD.
Below is an example of a message emitted on resource creation.
{"id":"http://localhost:8080/rest/test1234", "type": [ "http://www.w3.org/ns/ldp#Container", "http://fedora.info/definitions/v4/repository#Resource", "http://fedora.info/definitions/v4/repository#Container", "http://www.w3.org/ns/ldp#RDFSource", "http://www.w3.org/ns/prov#Entity"], "isPartOf":"http://localhost:8080/rest", "wasGeneratedBy":{"type":["http://fedora.info/definitions/v4/event#ResourceCreation", "http://fedora.info/definitions/v4/event#ResourceModification", "http://www.w3.org/ns/prov#Activity"], "identifier":"urn:uuid:d0f9d030-8fac-474c-882c-0858a7f948ef", "atTime":"2018-02-23T20:55:33.657Z"}, "wasAttributedTo":[{"type":"http://www.w3.org/ns/prov#Person","name":"bypassAdmin"}, {"type":"http://www.w3.org/ns/prov#SoftwareAgent","name":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"}], "@context":{"prov":"http://www.w3.org/ns/prov#", "foaf":"http://xmlns.com/foaf/0.1/", "dcterms":"http://purl.org/dc/terms/", "xsd":"http://www.w3.org/2001/XMLSchema#", "type":"@type", "id":"@id", "name":{"@id":"foaf:name","@type":"xsd:string"}, "identifier":{"@id":"dcterms:identifier","@type":"@id"}, "isPartOf":{"@id":"dcterms:isPartOf","@type":"@id"}, "atTime":{"@id":"prov:atTime","@type":"xsd:dateTime"}, "wasAttributedTo":{"@id":"prov:wasAttributedTo","@type":"@id"}, "wasGeneratedBy":{"@id":"prov:wasGeneratedBy","@type":"@id"} } }
Below is an example of a message emitted on resource update.
{"id":"http://localhost:8080/rest","type":["http://www.w3.org/ns/ldp#Container","http://fedora.info/definitions/v4/repository#Resource","http://fedora.info/definitions/v4/repository#Container","http://www.w3.org/ns/ldp#RDFSource","http://fedora.info/definitions/v4/repository#RepositoryRoot","http://www.w3.org/ns/ldp#BasicContainer","http://www.w3.org/ns/prov#Entity"],"isPartOf":"http://localhost:8080/rest","wasGeneratedBy":{"type":["http://fedora.info/definitions/v4/event#ResourceModification","http://www.w3.org/ns/prov#Activity"],"identifier":"urn:uuid:929f3118-48f0-4018-a321-b71d41155803","atTime":"2018-02-23T21:52:16.060Z"},"wasAttributedTo":[{"type":"http://www.w3.org/ns/prov#Person","name":"bypassAdmin"},{"type":"http://www.w3.org/ns/prov#SoftwareAgent","name":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"}],"@context":{"prov":"http://www.w3.org/ns/prov#","foaf":"http://xmlns.com/foaf/0.1/","dcterms":"http://purl.org/dc/terms/","xsd":"http://www.w3.org/2001/XMLSchema#","type":"@type","id":"@id","name":{"@id":"foaf:name","@type":"xsd:string"},"identifier":{"@id":"dcterms:identifier","@type":"@id"},"isPartOf":{"@id":"dcterms:isPartOf","@type":"@id"},"atTime":{"@id":"prov:atTime","@type":"xsd:dateTime"},"wasAttributedTo":{"@id":"prov:wasAttributedTo","@type":"@id"},"wasGeneratedBy":{"@id":"prov:wasGeneratedBy","@type":"@id"}}}
Below is an example of a message emitted on resource deletion.
{"id":"http://localhost:8080/rest/test1234","type":["http://www.w3.org/ns/ldp#Container","http://fedora.info/definitions/v4/repository#Resource","http://fedora.info/definitions/v4/repository#Container","http://www.w3.org/ns/ldp#RDFSource","http://www.w3.org/ns/prov#Entity"],"isPartOf":"http://localhost:8080/rest","wasGeneratedBy":{"type":["http://fedora.info/definitions/v4/event#ResourceDeletion","http://www.w3.org/ns/prov#Activity"],"identifier":"urn:uuid:f3408eef-010c-4bd8-88b2-7ef5131e9f47","atTime":"2018-02-23T21:52:16.060Z"},"wasAttributedTo":[{"type":"http://www.w3.org/ns/prov#Person","name":"bypassAdmin"},{"type":"http://www.w3.org/ns/prov#SoftwareAgent","name":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"}],"@context":{"prov":"http://www.w3.org/ns/prov#","foaf":"http://xmlns.com/foaf/0.1/","dcterms":"http://purl.org/dc/terms/","xsd":"http://www.w3.org/2001/XMLSchema#","type":"@type","id":"@id","name":{"@id":"foaf:name","@type":"xsd:string"},"identifier":{"@id":"dcterms:identifier","@type":"@id"},"isPartOf":{"@id":"dcterms:isPartOf","@type":"@id"},"atTime":{"@id":"prov:atTime","@type":"xsd:dateTime"},"wasAttributedTo":{"@id":"prov:wasAttributedTo","@type":"@id"},"wasGeneratedBy":{"@id":"prov:wasGeneratedBy","@type":"@id"}}}
See :