flexrep:configuration-target-set-immediate-push( $cfg as element(flexrep:configuration), $target-id as xs:unsignedLong, $immediate-push as xs:boolean ) as element(flexrep:configuration)
Set a target's "immediate push" flag. This defaults to true when a target is created. Normally, when a document is created or updated, flexrep will attempt to replicate it to all push targets from a single CPF action, and a single database transaction. When many targets are configured, there is a danger that this transaction will run for a long time and eventually time out. The "immmediate push" flag allows control over which targets should have documents replicated immediately, and which targets should have them replicated via the periodic retry scheduled task.
Query-based targets are always handled by the periodic retry scheduled task.
xquery version "1.0-ml"; import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" at "/MarkLogic/flexrep.xqy"; flexrep:configuration-insert( flexrep:configuration-target-set-immediate-push( $cfg, $target-id, fn:false()))