Kafka consumer that hooks into the document-generator process asynchronously
In order to build document-generator locally you will need the following:
- Run make
- Run ./start.sh
The supported environmental variables have been categorised by use case and are as follows.
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 |
A consumer group will poll the render-submitted-data-document topic for requests to generate a document.
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>
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 |