Producer service providing an endpoint to fetch publications for Themis since a specific timestamp.
Add the service to your docker-compose.yml
:
publication-producer:
image: kanselarij/themis-publication-producer
Add the following dispatcher rules in ./config/dispatcher/dispatcher.ex
to make the endpoint to list publication files available for the consuming service.
get "/publications/*path" do
Proxy.forward conn, path, "http://publication-producer/files/"
end
The service assumes a file service hosting the publication files is already available in the stack for the consumer to download the publication files.
Restart the updated service
docker-compose restart dispatcher
Create the newly added service
docker-compose up -d
Get a list of publication files generated since the request timestamp. The list is ordered by creation date, oldest first. This is also the order in which the files must be consumed.
Example response:
{
"data": [
{
"type": "files",
"id": "3be63fd0-c030-11ea-a482-b30a6eeb477f",
"attributes": {
"name": "delta-2020-07-07T08:59:58.409Z.json",
"created": "2020-07-07T08:59:58.413Z"
}
},
{
"type": "files",
"id": "3fd04b40-c030-11ea-a482-b30a6eeb477f",
"attributes": {
"name": "delta-2020-07-07T09:00:04.977Z.json",
"created": "2020-07-07T09:00:04.980Z"
}
}
]
}