Why don't manual merges appear as ENTITIES_MERGED_MANUALLY on the streaming queue?

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

  1. Change the consumer's filter or route to act on ENTITIES_MERGED for both manual and automatic merges, and on ENTITY_LOST_MERGE if it processes the loser profile.
  2. If the destination has a typeFilter (the list of event types sent to that destination, in the streamingConfig > messaging > destinations section of the tenant physical configuration), make sure it lists ENTITIES_MERGED and, if needed, ENTITY_LOST_MERGE. Listing ENTITIES_MERGED_MANUALLY there does no harm, but it doesn't change the type that is sent.
  3. Merge two test profiles, then check the consumer's raw input, before any filtering, for an ENTITIES_MERGED message whose uris include 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.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.