﻿<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="forwardSync" type="Microsoft.Exchange.Management.ForwardSync.ConfigurationData, Microsoft.Exchange.Management.ForwardSync" />
  </configSections>
  <!--
    Forward Sync Settings
    newOrganizationPowerShellSlowResponseTime: a time interval for new-organization remote powershell threshold. This value should be less than 6 minutes which is our Powershell execution limit.
    runspaceCacheSize: an integer representing the maximum capacity of the runspace cache, in number of runspaces.
    runspaceCacheExpirationInterval: a time interval, as hh:mm:ss, at which runspaces expire from the cache.
    maximumConnectionRedirectionCount: an integer representing maximum number of redirects allowed while connecting to Remote PowerShell, default value is 5 which is the same as RemotePowershell. 
    skipCertificateChecks = a bool flag representing whether authentication to open RemotePowershell can skip the certificate certificate authority (CA), common name (CN) and Revocation status check, default is false.
    enableErrorCounter: a boolean flag representing whether to enable cmdlet error counter. Default is false.
    enableSuppressionOfUnsupportedParametersKey: a boolean flag representing whether to enable the suppression of parameters that are not supported. Default is true.
    enableSingleAccountPartitionPerSI: a boolean flag representing whether to enable the restriction of SIs (fsync Service Instances) to particular account partitions 
                                  (so that each call to New-Organization puts the new organization in the account partition specified by the 'AccountPartition' field
                                  of the passed-in Service Instance.)
    errorCounterLogInterval: a time interval to log cmdlet error counter, default value is 10 minutes.
    errorCounterLogNumberLimit: an integer representing the number limit of errors to log cmdlet error counter during the interval(cmdletErrorCounterLogInterval), default value is 600.
    maxRetryCount: an integer representing the maximum number of retries that will be attempted. 
    retrySleepInterval: a time interval, as hh:mm:ss reprenting the time span to sleep before attempting next retry.
    mergeCookiesInterval: a time interval, as hh:mm:ss representing the interval between a tenant full sync completion and when MergeCookies is going to be called. If the actual time 
                          interval exceeds specified TimeSpan value, then a tenant full sync starting from the last finishing point is required to start again to limit the merging 
                          impact to delta sync stream. Default value is 5 mins.
    maxItemsPerPublishCall: an integer representing the maximum number of ServicePublication that will be published to the MSO server in a publish call, default value is 100.
    maxItemsPerGetDirectoryObjectsCall: an integer representing the maximum number of DirectoryObjectIdentity that GetDirectoryObjects will take in a call, default value is 100.
    thresholdTimePerBatch: a time interval representing the expected maximum time spent on process one delta sync batch from MSO, 
                           default is 90 minutes when maxCapacity of persistenceQueue is 50.
    msoSlowResponseTime: a time interval representing the expected maximum reponse time of one MSO request, default is 2 minutes.
    powerShellSlowResponseTime: a time interval representing the expected maximum response time of one powershell command invocation, default is 40 seconds.
    adSlowResponseTime: a time interval representing the expected maximum response time of one AD operation, default is 40 seconds.
    cpuUsagePrecentageWarningThreshold: a float representing the cpu usage warning threshold percentage, default is 10 percent.
    cpuUsagePrecentageErrorThreshold: a float representing the cpu usage error threshold percentage, default is 50 percent.
    memoryUsageMBytesWarningThreshold: a int representing the memory usage warning threshold million bytes, default is 2G.
    memoryUsageMBytesErrorThreshold: a int representing the memory usage error threshold million byptes, default is 4G.
    warningJobProcessorLoopCount: a int representing the job process loop count at which one warning event will be logged, default is 3.
    errorJobProcessorLoopCount: a int representing the job process loop count at which one exception will be throw and job process is teminated, default is 6.
    maxCookieHistoryCount: maximum count of cookies to be kept as part of the history. This should be set for testing purposes only.
    cookieHistoryInterval: time interval between cookies in the history. This should be set for testing purposes only.
    msoServiceInstanceCacheFilePath: MSO service instance map cache file.
    msoServiceInstanceCacheRefreshInterval: MSO service instance map cache refresh interval.
    exceptionHandling: section to configure how exceptions are going to be handled in forward sync. Action can be ignore or abortcookie.    
    haltErrorThreshold: number of errors that service halts when exceeded, default is 2000
    temporaryDivergenceLimit: nubmer of allowed temporary divergence in AD, default is 4000
    divergenceCountWarningFactor: divergence count warning factor, default is 0.5, currently not specific to the type of divergences
    divergenceCountUnhaltFactor: divergence count unhalt factor, default is 0.95, currently not specific to the type of divergences
    minimumSupportedCASVersion: minimum supported CAS version. default is 14.1.225.0
    minimumSupportedCASCountFraction: minimum fraction of all CASes in allowed version range that are supported by this service required to get the lease, default is 0.75
    skipDeltaSyncChangesDuringTenantFullSync: flag indicating if deltasync changes should be skipped while tenant full sync is going on, default is true
    disableNonUserMailboxOnLicenseRemoval: whether to disable shared, room and equipment mailboxes upon license removal
    excludedServerTimeOutOfLoadBalancer: the minimum amount of time an excluded server will be out of the load balancer. Default is 00:30:00
    crossSiteReplicationDelay: Expected cross site change replication delay. Default is 00:15:00
    inSiteReplicationDelay: Expected in-site change replication delay. Default is 00:05:00
    crossSiteReplicationWait: Cross site DC switch maximum wait. Default is 00:00:30
    inSiteReplicationWait: In-site DC switch maximum wait. Default is 00:00:30
    maxDomainControllerCacheLifeTime: The maximum time Forward Sync will keep overriding ADDriver's DC. Default is 03:00:00
    isLockoutFeatureEnabled: Whether to sync lockout organization state from MSO
    disableLicenseEnforcementOnTenantRecovery: Whether to turn off licensing enforcement when a tenant goes from Lockedout to Active
    isTenantPartialSyncDefault: Whether to exclude full and partial sync tenants from the delta sync stream
    collapseBiggestOffendersAtHaltEnabled: flag indicating if biggest offenders at halt should be collapsed to tenant wide divergence, default is false
    minDivergenceCountFactorForTenantWideDivergenceForBiggestOffenderAtHalt: min count factor of divergence for single tenant that should result in tenant wide divergence for biggest offender at halt, default is 0.2
    maxErrorsOnDivergence: max errors persisted on divergence count, default is 0
    isServicePlanMigrationFeatureEnabled: whether the service plan migration (Upsell) is enabled in Forward Sync
    enableContactUserCertificateAndUserSMIMECertificate: whether forwardsync should process UserCertificate or UserSMIMECertificate for Contacts
    enableSCTVersionCheckForNewOrganization: Switch to enable/disable checking for appropiate version SCT when selecting RPS server for new-organization calls.
    enableAutoRmsoProvisioning: a boolean flag representing whether to enable RMSO auto provisioning. Default is false.
    enableSyncServiceInfo: a boolean flag representing whether to sync RmsoSubscriptionStatus from ServiceInfo property. Default is false.
    enableReleaseTrack: a boolean flag representing whether to sync EnableReleaseTrack from ServiceInfo property. Default is false.    
    skipUnifiedGroup: whether ForwardSync should skip unified group object.
    wlmThrottlingEnabled: whether WLM throttling is enabled or not
    organizationThrottlingEnabled : whether organiation throttling is enabled or not
    isIgnoredForeignPrincipalMembershipFilterEnabled: Whether ignored foreign principals should also be excluded from role group memberships
    enableUnifiedGroupHandler: Switch to enable/disable unified group handler
    syncUnifiedGroupSharePointSiteInfo: switch to enable/disable syncing of SharePointSiteInfo
    filterRecipientsDuringReadyForRemoval: filter out updates to recipients while a company is being deleted
    organizationDCAffinity : Whether fwdsync manages new org DC affinity
    isServiceInstanceFromForestEnabled : whether to get service instance from forest or not
    isUseServiceInstanceNameInLogFileNameEnabled : whether to use service instance name as part of log file name or not
    isWriteEventlogToFileEnabled : whether to write event log entries to trace log file or not
    isSavingActiveServerHistoryEnabled : whether to save active history or not
    maxActiveServerHistoryEntries : max active server history entries to save
    syncTenantRootSharepointUrl: Switch to enable/disable syncing SharePoint root url to organization config.
    syncUnifiedGroupProxyAddresses: Switch to enable/disable syncing the proxyAddresses of a unified group
    activeWhenMailboxDatabasePresentEnabled : whether to check mailbox database presence in order for forward sync service to be active or not
    timeIntervalToCheckDatabaseStatus : time interval between database status checks (in Milliseconds)
    stripGroupSelfMembership: Whether we should strip off group the self membership
    isOpenLeaseFileInReadWriteModeForReadEnabled: whether to open the lease file in read/write mode so that the writers are not blocked
    ADConfigurationOperationRetrySleepIntervalInMilliseconds: config operation retry sleep interval in ms
    leaseFileOperationRetrySleepIntervalInMilliseconds: lease file operation retry sleep interval in ms
    ADConfigurationOperationRetryCount: config operation retry count
    leaseFileOperationRetryCount:  lease file operation retry count
    largeDistributionGroupThreshold: number of member count if exceeded, the system stops processing it and create divergence for the group

Example used for scalability tests: <forwardSync skipCertificateChecks="true" retrySleepInterval="00:00:30">
  -->

  <forwardSync
      msoServiceInstanceCacheFilePath="%ExchangeInstallPath%Logging\ForwardSyncLogs\Cache\BposServiceInstanceMapCache.xml"
      defaultDomainFixKey="true" isServiceInstanceFromForestEnabled="true">
    <!--
      Section to control what kind of error we can publish back to MSO.
      publishableExchangeErrorCategories: a string with the entries of Microsoft.Exchange.Data.ExchangeErrorCategory, delimited by comma, indicating which errors can be published to MSO.
      publishablePowerShellErrorCategories: a string with the entries of System.Management.Automation.ErrorCategory, delimited by comma, indicating which errors can be published to MSO.
      publishableCmdletExceptionTypes: a string with exception types, delimited by comma, indicating which errors can be published to MSO. The default value includes:
                                       Microsoft.Exchange.Configuration.ObjectModel.ProvisioningValidationException
      publishableCmdletExceptionStringIds: a string with StringIds of LocalizedString, delimited by comma, indicating which errors can be published to MSO.
      nonPublishableCmdletExceptionStringIds: a string with StringIds of LocalizedString, delimited by comma, indicating which errors should not be published to MSO.
      
      Analysis of validation errors is available at:
      http://office/15/teams/exchange/dc/provisioning/_layouts/OneNote.aspx?id=%2f15%2fteams%2fexchange%2fdc%2fprovisioning%2fShared%20Documents%2fProvisioning%20KB&wd=target%28ForwardSync.one%7c9339253D-A896-4A26-A3DF-E8C41B2DDF99%2fValidation%20Errors%7c06944864-437F-4D3C-98D0-9863484EDA07%2f%29
      onenote:http://office/15/teams/exchange/dc/provisioning/Shared%20Documents/Provisioning%20KB/ForwardSync.one#Validation%20Errors&section-id={9339253D-A896-4A26-A3DF-E8C41B2DDF99}&page-id={06944864-437F-4D3C-98D0-9863484EDA07}&end
      Initial validation errors to be excluded are:
      Ex6F9304 - The operation couldn't be performed because object '761bd601-3409-4fd2-953b-814f8f82e0e6' couldn't be found on 'SINPRD0302DC002.apcprd03.prod.outlook.com' - same as above but for link operation
      Ex9E65A2 - The operation couldn't be performed because 'fcfa4478-7a07-463c-8741-e7da820cb188' matches multiple entries - Duplicate objects - action in EXO required - until reconciliation workflow is up and running in cleanup mode
      Ex8155FB - There are multiple recipients matching the identity ""6b08b432-81b9-4bd4-8601-340974586931"". Please specify a unique value. - sane as above
      Ex2B633F - TestMailbox634626749244191465' can't use ExternalDirectoryObjectId '4d943bc4-7f69-4216-874b-0272c296d160' because it's already used. - replication delays - object is already there - retry will evaluate object is there and call set instead of new
    -->
    <publishableError
      publishableExchangeErrorCategories="WindowsLiveIdAlreadyUsed"
      publishablePowerShellErrorCategories="InvalidArgument, InvalidData, SyntaxError, InvalidType, ResourceExists"
      publishableCmdletExceptionStringIds=""
      nonPublishableCmdletExceptionStringIds="Ex6F9304,Ex9E65A2,Ex8155FB,Ex2B633F,Ex24E7C5,Ex17CDAE,Ex4215D1,Ex47D100,Ex94914C,Ex2A592C,ExD9E818"
      />
    <!--
      enabled: a boolean that indicate whether enable or disable Audit Log, this is required and default is false.
      directory: a string that indicate the directory location of Audit Log. This is mandatory parameter.
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Audit Log. 0 means no age quota. default is 30 days.
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Audit Log. default is 100 MB. 
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Audit Log. default is 30GB. 
      changeTypeFilter: a string with entries of ChangeType delimited by comma, representing the change type filter in Audit Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: enum of ChangeType (New, Update, Remove, Convert). default is empty.
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Audit Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty
      operationCodeFailedOnly: a boolean that indicate whether log failed operation code only, it means not log the success one. default is false. 
      allowedParameters: a string with entries of allowed parameters delimited by comma, representing the the allowed parameters in Audit Log. Logs only parameters belong to the allowed parameters. default is "*".
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds. 
    -->
    <auditLog
      enabled = "true"
      directory="%ExchangeInstallDir%Logging\ForwardSyncLogs\AuditLog\"
      />
    <!--
      enabled: a boolean that indicate whether enable or disable Publish Log. this is required and default is false.
      directory: a string that indicate the directory location of Publish Log. This is mandatory. 
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Publish Log. default is 100 MB. 
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Publish Log. 0 means no age quota. default is 30 days.
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Publish Log. default is 30GB.
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Publish Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty.
      updateResultCodeFailedOnly: a boolean that indicate whether log failed update result code only, it means not log the success one. default is false.
      errorDetailEnabled: a boolean that indicate whether log the XML of error detail in Publish Log. default is true. 
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds. 
    -->
    <publishLog
      enabled = "true"
      directory="%ExchangeInstallDir%Logging\ForwardSyncLogs\PublishLog\"
      />
    <!--
      enabled: a boolean that indicate whether enable or disable Receive Log. this is require and default is false. 
      directory: a string that indicate the directory location of Receive Log. This is mandatory. 
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Receive Log. 0 means no age quota. default is 30 days. 
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Receive Log. default is 100MB. 
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Receive Log. default is 30GB. 
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Receive Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty. 
      directoryTypeFilter: a string with entries of DirectoryType delimited by comma, representing the DirectoryType filter in Receive Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: enum of DirectoryType. default is empty. 
      logCacheSize: maximum log cache size in mega bytes. Default is 2 mega bytes.        
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds.       
    -->
    <receiveLog
      enabled = "true"
      directory="%ExchangeInstallDir%Logging\ForwardSyncLogs\ReceiveLog\"
      />
    <!--
      enabled: a boolean that indicate whether enable or disable Trace Log. this is require and default is false. 
      directory: a string that indicate the directory location of Trace Log. This is mandatory. 
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Trace Log. 0 means no age quota. default is 30 days. 
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Trace Log. default is 100MB. 
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Trace Log. default is 30GB. 
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Trace Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty. 
      directoryTypeFilter: a string with entries of DirectoryType delimited by comma, representing the DirectoryType filter in Trace Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: enum of DirectoryType. default is empty. 
      logCacheSize: maximum log cache size in mega bytes. Default is 2 mega bytes.        
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds.       
    -->
    <eventLog
      enabled = "true"
      directory="%ExchangeInstallDir%Logging\ForwardSyncLogs\EventLog\"
      />
    <exceptionHandling>
      <!--
      You can add exceptions in the following list to control forward sync behavior. Allowed action include Ignore and Retry now.
      Ignore means this exception will be caught and ignored. Retry means this exception will cause us to retry provisioning 
      by aborting cookie advancement or just retry the changes for this tenant.
      1. Use version 15.0.0.0 for any assemblies in the Exchange bin folder.
      2. a. Use GAC_Assemblyversion as the version for any GAC'd assemblies. It'll be replaced with correct version during build time.
         b. In prodution you need to specify the correct version yourself.
      -->
      <add type="System.IO.FileLoadException"  action="Retry" />
      <add type="System.Threading.ThreadInterruptedException" action="Retry" />
      <add type="System.TimeoutException" action="Retry" />
      <add type="Microsoft.Exchange.Management.ForwardSync.PublicationFailedException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="Microsoft.Exchange.Management.ForwardSync.JobProcessorDeepLoopException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="System.Management.Automation.RemoteException, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="System.Management.Automation.RuntimeException, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="System.Management.Automation.Runspaces.InvalidRunspaceStateException, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="System.ServiceModel.CommunicationException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" action="Retry" />
      <add type="Microsoft.Exchange.Data.Common.TransientException, Microsoft.Exchange.Data.Common, Version=15.00.991.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="Microsoft.Exchange.Management.ForwardSync.WorkflowException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="Microsoft.Exchange.Management.ForwardSync.TenantContextNotFoundException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="Microsoft.Exchange.Management.ForwardSync.TenantContextNotWritableException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Retry" />
      <add type="Microsoft.Exchange.Management.ForwardSync.LargeDistributionGroupException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" action="Ignore" />
    </exceptionHandling>

    <!-- Configuration of the various sync streams and their related queues. -->
    <syncContext>
      <publishingQueue maxCapacity="2000" workerThreads="5" pollingInterval="00:00:00">
        <processItemRetry delayBetweenRetries="00:00:05" maxAttempts="30" timeToLive="1.00:00:00" />
      </publishingQueue>
      <companyQueues>
        <tenantChangesQueue maxCapacity="2000" workerThreads="12" pollingInterval="00:00:00">
          <processItemRetry delayBetweenRetries="00:00:05" delayMultiplier="1" maxAttempts="3" timeToLive="1.00:00:00" />
        </tenantChangesQueue>
        <workflowQueue maxCapacity="2000" workerThreads="12" pollingInterval="00:00:00">
          <processItemRetry delayBetweenRetries="00:00:05" delayMultiplier="1" maxAttempts="3" timeToLive="00:10:00" />
        </workflowQueue>
        <fullSyncControllerQueue maxCapacity="500" workerThreads="20" pollingInterval="00:00:00">
          <processItemRetry delayBetweenRetries="00:00:10" maxAttempts="1" timeToLive="01:00:00" />
        </fullSyncControllerQueue>
        <fullSyncPollingWorker pollingInterval="00:01:00" />
      </companyQueues>
      <recipientQueues>
        <tenantChangesQueue maxCapacity="2000" workerThreads="24" pollingInterval="00:00:00">
          <processItemRetry delayBetweenRetries="00:00:05" delayMultiplier="1" maxAttempts="3" timeToLive="1.00:00:00" />
          <throttler maxMinutesToTrack="20" sweepDepthInMinutes="10" minutesBetweenSweeps="11" objectThreshold="400" linkThreshold="1500" percentageOfStreamThreshold="38" requireTenantInBackLogToTFS="false" />
        </tenantChangesQueue>
        <workflowQueue maxCapacity="2000" workerThreads="24" threadsPreferingFullSyncChanges="5" pollingInterval="00:00:00">
          <processItemRetry delayBetweenRetries="00:00:05" delayMultiplier="1" maxAttempts="3" timeToLive="00:10:00" />
        </workflowQueue>
        <fullSyncControllerQueue maxCapacity="500" workerThreads="20" pollingInterval="00:00:00">
          <processItemRetry delayBetweenRetries="00:00:10" maxAttempts="1" timeToLive="01:00:00" />
        </fullSyncControllerQueue>
        <fullSyncPollingWorker pollingInterval="00:01:00" />
      </recipientQueues>
      <deltaSync>
        <companyStream pollingInterval="00:00:05">
          <persistenceQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" />
          </persistenceQueue>
          <provisioningQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" delayMultiplier="2" maxAttempts="4" timeToLive="1.00:00:00"/>
          </provisioningQueue>
        </companyStream>
        <recipientStream pollingInterval="00:00:05">
          <persistenceQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" />
          </persistenceQueue>
          <provisioningQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" delayMultiplier="2" maxAttempts="4" timeToLive="1.00:00:00"/>
          </provisioningQueue>
        </recipientStream>
      </deltaSync>
      <fullSync>
        <companyStream pollingInterval="00:00:20">
          <persistenceQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" />
          </persistenceQueue>
          <provisioningQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" delayMultiplier="2" maxAttempts="4" timeToLive="1.00:00:00"/>
          </provisioningQueue>
        </companyStream>
        <recipientStream pollingInterval="00:00:20">
          <persistenceQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" />
          </persistenceQueue>
          <provisioningQueue maxCapacity="50" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" delayMultiplier="2" maxAttempts="4" timeToLive="1.00:00:00"/>
          </provisioningQueue>
        </recipientStream>
      </fullSync>
      <objectFullSync>
        <companyStream pollingInterval="00:00:20">
          <persistenceQueue maxCapacity="5" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" />
          </persistenceQueue>
          <provisioningQueue maxCapacity="5" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" delayMultiplier="2" maxAttempts="4" timeToLive="1.00:00:00"/>
          </provisioningQueue>
        </companyStream>
        <recipientStream pollingInterval="00:00:10">
          <persistenceQueue maxCapacity="5" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" />
          </persistenceQueue>
          <provisioningQueue maxCapacity="5" pollingInterval="00:00:00">
            <processItemRetry delayBetweenRetries="00:00:10" delayMultiplier="2" maxAttempts="4" timeToLive="1.00:00:00"/>
          </provisioningQueue>
        </recipientStream>
      </objectFullSync>
      <RecipientDrainingWorker pollingInterval="00:01:00" />
    </syncContext>
  </forwardSync>

  <!--
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="XmlMessageLogger" />
        </listeners>
      </source>
      <source name="Microsoft.PowerShell.HostingTools.RunspaceLifetime" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="XmlMessageLogger" />
        </listeners>
      </source>
      <source name="Microsoft.PowerShell.HostingTools.Performance" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="XmlMessageLogger" />
        </listeners>
      </source>
      <source name="Microsoft.PowerShell.HostingTools.Configuration" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="XmlMessageLogger" />
        </listeners>
      </source>
      <source name="ForwardSync" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="XmlMessageLogger" />
        </listeners>
      </source>
      <source name="CmdletInvocation" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="XmlMessageLogger" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="XmlMessageLogger" 
           initializeData="D:\ExchangeLogs\fwdSync.svclog" 
           type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
           traceOutputOptions="DateTime, Timestamp, ThreadId">
      </add>
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>
  -->
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel" propagateActivity="true">
        <listeners>
          <add name="default" type="System.Diagnostics.DefaultTraceListener" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
  <system.serviceModel>
    <!--
    <diagnostics wmiProviderEnabled="false">
      <messageLogging logEntireMessage="true" logMalformedMessages="true"
        logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true"
        maxSizeOfMessageToLog="26214400" />
    </diagnostics>
    -->
    <bindings>
      <!--
        Binding setting for MSO Sync Web Service. 
        The current value of maxBufferPoolSize and maxReceivedMessageSize is same as the server side setting. 
        It is recommended to keep client and server have same setting on these two parameters.
      -->
      <wsHttpBinding>
        <binding name="SyncServiceBinding" maxBufferPoolSize="128000000" maxReceivedMessageSize="128000000" sendTimeout="00:02:00">
          <security mode="Transport">
            <transport clientCredentialType="Certificate" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
  </system.serviceModel>
</configuration>
