Sign inSign up

coco/post-publication-combiner

By coco

Updated 9 days ago

This service produces combined messages based on content and metadata kafka events

Image
1

10K+

coco/post-publication-combiner repository overview

upp-post-publication-combiner

Circle CIGo Report Card Coverage Status

Introduction

This service builds combined messages (content + annotations) based on events received from PostConceptAnnotations or PostPublicationEvents.
The combined message is then sent to the CombinedPostPublicationEvents kafka queue.

This is a combination point for synchronizing the content and the metadata publish flows. Note: one publish event can result in two messages in the CombinedPostPublicationEvents topics (one for the content publish, and one for the metadata publish).

The service has a force endpoint, that allows putting a combined message in the queue, with the actual data from our content and metadata stores.

This service depends on the following services:

  • kafka/kafka-proxy
  • document-store-api (/content endpoint)
  • public-annotations-api (/content/{uuid}/annotations endpoint)

Installation

In order to install, execute the following steps:

    go get -u github.com/Financial-Times/post-publication-combiner
    cd $GOPATH/src/github.com/Financial-Times/post-publication-combiner
    dep ensure -vendor-only
    go test ./...
    go install

Running locally

  1. Run the tests and install the binary:

     go test ./...
     go install
    
  2. Run the binary (using the help flag to see the available optional arguments):

     $GOPATH/bin/post-publication-combiner
    

Please check --help for more details.

Test: You can verify the service's behavior by checking the consumed and the generated kafka messages. You can also use the force endpoint

Build and deployment

Service/Utility endpoints

Refer to api.yml for api related documentation.

Healthchecks

Our standard admin endpoints are: /__gtg - returns 503 if any if the checks executed at the /__health endpoint returns false

/__health

Checks if:

  • kafka-proxy is reachable
  • document-store-api is reachable
  • public-annotations-api is reachable

/__build-info

Logging
  • The application uses the FT go-logger library, based on logrus.
  • NOTE: /__build-info and /__gtg endpoints are not logged as they are called frequently.

Tag summary

Content type

Image

Digest

sha256:d60d9f27f

Size

7 MB

Last updated

9 days ago

docker pull coco/post-publication-combiner