Platform Explorer / Nuxeo Platform LTS 2019 10.10

Component org.nuxeo.ecm.core.bulk.config

Requirements

Resolution Order

849
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.bulk.config" version="1.0.0">

  <require>org.nuxeo.runtime.stream.service</require>

  <!-- ======================================================================================= -->
  <!-- Bulk Service configuration -->

  <!-- Initialize bulk service streams before action processors -->
  <extension point="logConfig" target="org.nuxeo.runtime.stream.service">
    <logConfig name="bulk">
      <!-- command stream size sets the maximum concurrency for the scroller computation in the Nuxeo cluster -->
      <log name="command" size="2" />
      <!-- status stream size sets the maximum concurrency for the status computation in the Nuxeo cluster -->
      <log name="status" size="1" />
      <!-- done stream size sets the maximum concurrency for the triggers computations -->
      <log name="done" size="1" />
    </logConfig>
  </extension>

  <!-- Configure the bulk service processor for this instance, we are using the configuration service -->
  <!-- because the bulk processor is initialized manually after the Stream service has started the action processors -->
  <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
    <!-- Scroll computation -->
    <property name="nuxeo.core.bulk.scroller.continueOnFailure">false</property>
    <property name="nuxeo.core.bulk.scroller.concurrency">2</property>
    <property name="nuxeo.core.bulk.scroller.scroll.size">200</property>
    <property name="nuxeo.core.bulk.scroller.scroll.keepAliveSeconds">60</property>
    <property name="nuxeo.core.bulk.scroller.produceImmediate">false</property>
    <!-- Status computation -->
    <property name="nuxeo.core.bulk.status.continueOnFailure">false</property>
    <property name="nuxeo.core.bulk.status.maxRetries">3</property>
    <property name="nuxeo.core.bulk.status.delayMillis">1000</property>
    <property name="nuxeo.core.bulk.status.maxDelayMillis">10000</property>
    <property name="nuxeo.core.bulk.status.concurrency">1</property>
  </extension>


  <!-- ======================================================================================= -->
  <!-- Actions configuration -->

  <extension target="org.nuxeo.ecm.core.bulk" point="actions">
    <!-- Internal -->
    <action name="trash" bucketSize="100" batchSize="25" sequentialCommands="true" />
    <action name="removeProxy" bucketSize="100" batchSize="25" />
    <action name="setSystemProperties" bucketSize="100" batchSize="25" />
    <!-- Exposed through REST API -->
    <action name="setProperties" bucketSize="100" batchSize="25" httpEnabled="true"
      validationClass="org.nuxeo.ecm.core.bulk.validation.SetPropertiesValidation"/>
  </extension>

  <!-- Action's processor -->
  <extension target="org.nuxeo.runtime.stream.service" point="streamProcessor">
    <!-- SetProperty processor -->
    <streamProcessor name="setProperties" class="org.nuxeo.ecm.core.bulk.action.SetPropertiesAction" logConfig="bulk"
      defaultConcurrency="2" defaultPartitions="2">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

    <!-- SetSystemProperty processor -->
    <streamProcessor name="setSystemProperties" class="org.nuxeo.ecm.core.bulk.action.SetSystemPropertiesAction"
      logConfig="bulk" defaultConcurrency="2" defaultPartitions="2">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

    <!-- RemoveProxy processor -->
    <streamProcessor name="removeProxy" class="org.nuxeo.ecm.core.bulk.action.RemoveProxyAction" logConfig="bulk"
      defaultConcurrency="2" defaultPartitions="2">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

    <!-- Trash processor -->
    <streamProcessor name="trash" class="org.nuxeo.ecm.core.bulk.action.TrashAction" logConfig="bulk"
      defaultConcurrency="1" defaultPartitions="1">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

  </extension>

</component>