Product DocsMenu

Fine-Tuning the Exchange Callback Service

For Microsoft Exchange Server 2007, 2010 and 2013 (On-Premises and hybrid), the Coveo Exchange (WebServices) connector uses Microsoft Exchange callback service API to request notifications from Exchange when content is modified within a monitored mailbox. With this information, the connector can immediately update the good folders and items on the next incremental refresh run, instead of polling for every folder in every mailbox. This ability drastically improves incremental refresh performances and reduces bandwidth usage. The CES installer deploys the callback service that starts when an Exchange WebServices connector requests it. By default, a new Exchange WebServices source is ready to use the Exchange Callback Service.

The Callback Service Url source parameter indicates the location of the Exchange Callback Service (see Configuring and Indexing a Microsoft Exchange Source for an On-Premises Deployment).

Notes: CES 7.0.8047+ (December 2015) (For Exchange Online only)

  • Due to an Exchange Web Services limitation (which limits the number of online mailbox subscriptions to approximately 20), the callback service is disabled by default in the following three cases (see Exchange Online Throttling and Limits FAQ):

    • The starting addresses contain more than one Exchange Online address.

    • One of the starting addresses points to an Exchange Online folder.

      Example: https://outlook.office365.com/owa

    • One of the starting addresses points to an Exchange Online public folder.

      Example: https://outlook.office365.com/public

  • When the callback service is disabled, the following message is shown in the CES Console:

    "Targeting multiple Exchange Online mailboxes. The Notification Callback Service will not be used because of Exchange Online subscription limit of 20 mailboxes.Use the parameter 'UseCallbackServiceForMultipleExchangeOnlineStartingItems' to override this behavior."

  • If you still want to use the callback service to receive change notifications during incremental refreshes, have in mind that it will only work for 20 (or less) mailboxes or public folders. When you try to subscribe to more mailboxes/public folders, you get the following error message:

    Folder error: https://outlook.office365.com/public/[path]

    You have exceeded the available subscriptions for your account.

    Remove unnecessary subscriptions and try your request again.

Important: Ensure to open the port 8181 in the firewall. The Exchange Server has to connect to the Exchange Callback Service to send notifications.

The Exchange Callback Service requires that a user identity is defined on the source to work.

When an Exchange WebServices source starts, a message appears in the CES log to specify whether the Exchange Callback Service is used or not, either because it is not configured correctly or cannot be started.

Callback service state Message in CES log when an Exchange (WebServices) source starts
Used [SourceName] – Using Push Notifications.
Not used An error message followed by:
[SourceName] – Using Standard Mode.

The Exchange Callback Service is configured to run correctly in most cases using default parameter values. You can however manually configure advanced parameters in the Exchange Callback Service configuration file to fine-tune out-of-the-box behaviors.

To fine-tune the Exchange Callback Service configuration file

  1. Refer to the following list of available configuration file parameters to see if you need to change the default value of one or more of them.

    LogFileLifeTime

    Duration before a log file is automatically deleted by the service. Default is 30 days.

    LogMaxSize

    Maximum size before splitting a log file. Default is 10 MB (10485760 bytes).

    MaxConnections

    Maximum number of concurrent connections that the service can create when calling the Exchange WebServices. Default is 4 connections.

    ShowAllCounters

    Displays the usage statistics about the service in the CES console and logs before each incremental refresh run. Default is false.

    DataFilePath

    Location of the data files used by the service. By default, data files are located in the [Index_Path]\Index\Crawlers\EchangeCallbackService folder.

    LogFilePath

    Location of the log files created by the service. By default, log files are saved in the same folder as the other CES log files ([Index_Path]\Log).

    SubscriptionTimeout

    Duration before an Exchange subscription is considered invalid. This value should not be changed unless there are issues using the default value. Default is 30 minutes. Maximum allowed is 1440 minutes.

    HostName

    Host name used internally to build the web service URL. Changing this value affects directly the Callback Service Url parameter that is set on an Exchange source. Default is the computer name.

    PortNumber

    Port number used internally to build the web service URL. Changing this value affects directly the Callback Service Url parameter that is set on an Exchange source. Default is 8181.

    ReaderQuotas CES 7.0.6607+ (April 2014)

    Default limits for the complexity of received messages (see XmlDictionaryReaderQuotas Class). May need to be increased when recommended by Coveo Support to ensure proper communication from Exchange to the Callback service.

    The default and recommended values are: 

    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

  2. Using an administrator account, connect to the Coveo Master server.

  3. Browse to the CES bin folder ([CES_Path]\Bin).

  4. Using a text editor:

    1. Open the CESExchangeCallbackService.exe.config file.

    2. Under <configuration> in the content of the file, locate the <appSettings> section.

    3. Add one custom parameter per line under <appSettings> using the following format:

      <add key=”parameter_name” value=”value”>

    4. Save the file.

      Example: To specify a maximum number of connections equal to 6, add line 4 as shown in the following file excerpt.
      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <appSettings>
      	<add key=”MaxConnections” value=”6”>
        </appSettings>
        ...
      </configuration>  
People who viewed this topic also viewed