This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Configuration for the application is at config/default.js and config/production.
3535- UBAHN_CREATE_TOPIC: Kafka topic for create message
3636- UBAHN_UPDATE_TOPIC: Kafka topic for update message
3737- UBAHN_DELETE_TOPIC: Kafka topic for delete message
38+ - UBAHN_AGGREGATE_TOPIC: Kafka topic that is used to combine all create, update and delete message(s)
3839- ES.HOST: Elasticsearch host
3940- ES.API_VERSION: Elasticsearch API version
4041- ES.DOCUMENTS: Elasticsearch index, type and id mapping for resources.
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ module.exports = {
3636 UBAHN_CREATE_TOPIC : process . env . UBAHN_CREATE_TOPIC || 'u-bahn.action.create' ,
3737 UBAHN_UPDATE_TOPIC : process . env . UBAHN_UPDATE_TOPIC || 'u-bahn.action.update' ,
3838 UBAHN_DELETE_TOPIC : process . env . UBAHN_DELETE_TOPIC || 'u-bahn.action.delete' ,
39+ UBAHN_AGGREGATE_TOPIC : process . env . UBAHN_AGGREGATE_TOPIC || 'u-bahn.action.aggregate' ,
3940
4041 EMSI : {
4142 CLIENT_ID : process . env . EMSI_CLIENT_ID ,
Original file line number Diff line number Diff line change @@ -246,6 +246,12 @@ async function postEvent (topic, payload) {
246246 payload
247247 }
248248 await busApiClient . postEvent ( message )
249+
250+ // Post to the aggregate topic
251+ message . payload . originalTopic = topic
252+ message . topic = config . UBAHN_AGGREGATE_TOPIC
253+ logger . debug ( `Posting event to aggregate topic ${ message . topic } ` )
254+ await busApiClient . postEvent ( message )
249255}
250256
251257module . exports = {
You can’t perform that action at this time.
0 commit comments