post-publication-combiner

command module
v1.3.9-k8s-whitelist-u... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 21 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL