Loading TOC...

MarkLogic Server 11.0 Product Documentation
flexrep.configurationSetAlertingUri

flexrep.configurationSetAlertingUri(
   cfg as element(flexrep.configuration),
   uri as String?
) as element(flexrep.configuration)

Summary

Set the alerting URI for a FlexRep configuration. This enables query-based replication to any targets that are configured with a user-id. The alerting URI may be anywhere within the database, however flexrep:domain-alerting-uri() returns a convenient directory within the FlexRep configuration area.

Parameters
cfg The replication configuration.
uri The alerting configuration URI.

Example

const flexrep = require('/MarkLogic/flexrep');

  declareUpdate();

  // Obtain the domain ID from the database used by the Master to enable CPF.
  const domain = xdmp.eval(
    'const dom = require("/MarkLogic/cpf/domains");' +
      'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));',
       null,
         {
          'database' : xdmp.database('Triggers')
         });

   // Create a replication configuration for the Replicated Content domain.
   const cfg = flexrep.configurationCreate(domain);
   const domainId = flexrep.configurationGetId(cfg);

flexrep.configurationInsert(
  flexrep.configurationSetAlertingUri(cfg,
    flexrep.domainAlertingUri(domainId)));
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.