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
Customer Scope: EnterWorks customers who use this feature will need to update the shared configuration properties.
The Rabbit connection and exchange names are shared with previous settings defined for
enable-typeahead-service
:
# For SSL Connection the connection string must contain both username and password
# or it will fail to connect.
# enableStoreItem queue is reserved for the enable-typeahead-service.
# username:password@hostname
amqp.connectionString=enable2020:enable2020@EWAPP30
amqp.queueName=enableStoreItem
# used by the class AMQPClientHelper
# the connection to be closed when it is in idle state for the specified minutes, default to 480 minutes
amqp.client.connection.maxInactiveInterval=480
# used by the class AMQPClientHelper
# RPC timeout - seconds before timing out on wait for response, default to 120 seconds
amqp.rpc.timeout=120
# used by the class AMQPClientHelper
# Define Epim Topic Message EXCHANGE_NAME
Add the following configuration 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
#
#######################################################################
External event handling must be enabled. If the following settings have not been added, add them.
allow.external.event.handler=true
allow.external.event.links=false
external.event.handlers=amqp,
If there are more than one external event handlers, add them all to:
external.event.handlers=amqp, <add any additional event handlers>
Message JSON Format:
{
"repoName": "DebTestProduction" ,
"repoId": "10300",
"action": "10",
"itemList":[{
"itemId": "8635227",
"itemAttrData": "<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>" ,
"recordState": "0",
"productionState": "1" ,
"workflowState": "0",
"globalInd": "",
"attrLastUpdateDatetimeMillis": "1559158088523",
"attrLastUpdateBy": "1" ,
"lastUpdateDatetimeMillis": "1559158088523",
"lastUpdateBy": "1",
"creationDatetimeMillis": "1559158088523",
"createdBy": "1"
},{
"itemId": "8635228",
"itemAttrData": "<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>" ,
"recordState": "0",
"productionState": "1" ,
"workflowState": "0",
"globalInd": "",
"attrLastUpdateDatetimeMillis": "1559158088523",
"attrLastUpdateBy": "1" ,
"lastUpdateDatetimeMillis": "1559158088523",
"lastUpdateBy": "1",
"creationDatetimeMillis": "1559158088523",
"createdBy": "1"
},{
"itemId": "8635229",
"itemAttrData": "<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>" ,
"recordState": "0",
"productionState": "1" ,
"workflowState": "0",
"globalInd": "",
"attrLastUpdateDatetimeMillis": "1559158088523",
"attrLastUpdateBy": "1" ,
"lastUpdateDatetimeMillis": "1559158088523",
"lastUpdateBy": "1",
"creationDatetimeMillis": "1559158088523",
"createdBy": "1"
}]}