Question
The Activity Log records a merge done by a user as ENTITIES_MERGED_MANUALLY, and the profile's History tab shows it as a manual merge. A consumer that reads Reltio events from an external streaming destination (a queue or topic) filters or routes on ENTITIES_MERGED_MANUALLY, but no message of that type arrives, while created, changed, and removed profiles flow normally. Why are manual merges missing, and how should the consumer pick them up?
Answer
Manual merges aren't missing; they're sent with a different type. ENTITIES_MERGED_MANUALLY is an internal event type, and it's what the Activity Log shows. When Reltio sends a merge to an external queue, it always converts the type to ENTITIES_MERGED, the same type used for automatic merges. Merges on the fly (ENTITIES_MERGED_ON_THE_FLY) are also sent as ENTITIES_MERGED. A filter or route that matches only ENTITIES_MERGED_MANUALLY therefore never matches a message on the queue.
What the queue receives for a merge
A merge sends an ENTITIES_MERGED message, and the profile that lost the merge (the loser) gets its own ENTITY_LOST_MERGE message. Each message has tenantId, eventType, and sourceObjectUri headers. The ENTITIES_MERGED body looks like this, where uris lists all the profiles in the merge:
{
"type": "ENTITIES_MERGED",
"uris": ["entities/<entityId1>", "entities/<entityId2>"]
}When JMSIncludeMergeTime is enabled in the streaming configuration (it's off by default), the body also has updatedTime, the time of the merge.
How to fix the consumer
- Change the consumer's filter or route to act on
ENTITIES_MERGEDfor both manual and automatic merges, and onENTITY_LOST_MERGEif it processes the loser profile. - If the destination has a
typeFilter(the list of event types sent to that destination, in thestreamingConfig>messaging>destinationssection of the tenant physical configuration), make sure it listsENTITIES_MERGEDand, if needed,ENTITY_LOST_MERGE. ListingENTITIES_MERGED_MANUALLYthere does no harm, but it doesn't change the type that is sent. - Merge two test profiles, then check the consumer's raw input, before any filtering, for an
ENTITIES_MERGEDmessage whoseurisinclude both profiles.
How to tell a manual merge from an automatic one
The documented message body has only type, uris, and the optional updatedTime, so it doesn't show whether a merge was manual. If the consumer needs to know, it can read the merged profile's merge tree. {TenantURL} is https://<environment>.reltio.com/reltio/api/<tenantId>.
GET {TenantURL}/entities/<entityId>/_crosswalkTree
Authorization: Bearer <access_token>In the response, each merge has a mergeReason. A merge done by a user shows Merge by hand, and the user field shows who did it.
Comments
Article is closed for comments.