Message Queue Integration for Microservices
Description: A topic notification queue can be set up in RabbitMQ that provides the ability to notify external applications upon changes made to repository data. All changes to the configured repositories will be broadcast to the topic, and any microservice can subscribe to receive these notifications and implement a process to act upon those messages.
EnterWorks Product Applicability: EnterWorks 10.0+ starting from build 20190531, Enable 9.0 (if configured for Microservices)
Third Party Product: RabbitMQ 3.7+
Customer Scope: EnterWorks customers who use or want use this feature will need to update the configuration in sharedConfig.proeprties.
The Rabbit connection and exchange names are shared with previous setting defined for Elasticsearch configurations:
|
Add the following config settings in order to enable the ability to send notifications for repository edits.
####################################################################### # Setup Repository Record Create/Update/promote topic message on AMQP ####################################################################### # amqp.itemTopicMsg.enabled=true # # routing key: epimitem.<repositoryId>.<action> # amqp.itemTopicMsg.routingKeyPrefix= epimitem # # For store records, specify: all Repositories - allrepositories, or comma separated list of selected repository names amqp.itemTopicMsg.storeRecords.repository.list = # #Set true to include data in message amqp.itemTopicMsg.storeRecords.includeDataInd =true # # For promote records, specify: all Repositories - allrepositories, or or comma separated list of selected repository names amqp.itemTopicMsg.promoteRecords.repository.list = # #Set true to include data in message amqp.itemTopicMsg.promoteRecords.includeDataInd =true # #Set integer number of records up to pagesize to include in single batch amqp.itemTopicMsg.promoteRecords.msgBatchSize =20 # ####################################################################### |
Message JSON Format:
{ "repoName": "DebTestProduction" , "repoId": "10300", "action": "10", "itemList": [ {
"<Item><F_1002115>george</F_1002115><F_1002114>2</F_1002114><F_1005523>1.2</F_1005523><F_1002118>1</F_1002118><F_1002116>desc-FR2 appendThis</F_1002116><F_1011866>desc-FR2 appendThis</F_1011866></Item>" ,
"<Item><F_1002115>deba</F_1002115><F_1002114>10003</F_1002114><F_1005523>5.5</F_1005523><F_1002118>1</F_1002118><F_1002116>mEdit appendThis</F_1002116><F_1011866>mEdit appendThis</F_1011866></Item>" ,
"<Item><F_1002115>deba</F_1002115><F_1002114>10004</F_1002114><F_1005523>5.5</F_1005523><F_1002118>1</F_1002118><F_1002116>mEdit appendThis</F_1002116><F_1011866>mEdit appendThis</F_1011866></Item>" ,
} |