Skip to content

Kafka consumer that hooks into the document-generator process asynchronously

License

Notifications You must be signed in to change notification settings

companieshouse/document-generator-consumer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

document-generator-consumer

Kafka consumer that hooks into the document-generator process asynchronously

Requirements

In order to build document-generator locally you will need the following:

Getting started

  1. Run make
  2. Run ./start.sh

Environment Variables

The supported environmental variables have been categorised by use case and are as follows.

Deployment Variables

Name Description Mandatory Default Example
DOCUMENT_GENERATION_CONSUMER_SERVICE_PORT Configured port application runs on. 10097
CONSUMER_TOPIC Topic for the consumer to pick up render-submitted-data-document
GROUP_NAME Group name for the consumer document-generator
CHS_API_KEY Chs api key encoded and used to make APi calls valid Api key

Kafka

Consumer

A consumer group will poll the render-submitted-data-document topic for requests to generate a document.

Docker

To build a Docker image run the following command:

mvn compile jib:dockerBuild

This will output a Docker imaged named: 169942020521.dkr.ecr.eu-west-1.amazonaws.com/local/document-generator-consumer

You can specify a different image name run mvn compile jib:dockerBuild -Dimage=<YOUR NAME HERE>

Producer

The following topics are produced to during the generation process:

Name Description
document-generation-started Notification that the generation of the document has started
document-generation-completed Details of the generated document
document-generation-failed Notification that the generation of the document has failed