Content Hub

Exporting multiple entities at once in Content Hub 1.x


As a content creator, you may need to export more than one of your publishing website’s entities to your Content Hub at the same time. To help you with your content management, Content Hub handles many entities at once through the use of an optional export queue. Each item in the export queue has entities to export to Content Hub.

You can export entities from the queue using either the user interface or Drush.


For information about batch imports (instead of exports) of entities, see Importing multiple entities at once.

Enabling the export queue

The Export Queue configuration page enables the export queue, and changes its behavior. To enable the queue:

  1. Sign in to your website as an administrator.
  2. Go to Configuration > Web Services > Acquia Content Hub.
  3. Click the Export Queue tab.
  4. Select the Export via queue checkbox. Acquia Content Hub will display configuration options.
  5. Click Save Configuration.

Configuring the export queue

The export queue is a Drupal batch process, and each item in the batch process has entities to export. To alter the queue configuration values, navigate to the Export Queue page to display the Queue Behavior Configuration section. The section includes the following settings:


Increasing any of the values will place load on your publishing and subscribing sites, and should be done with caution.

  • Queue Batch Size: Number of queue items processed in the same batch queue process. Processing more batch items simultaneously will add load to the exporting website. Default value: 1
  • Entities Per Queue Item: Maximum number of entities sent through an entity hook to be included in a queue item. The entities and all their dependencies (including vocabulary items and node references) will be sent to Acquia Content Hub in the same HTTP request. Increasing this value increases the size and complexity of each queue item, which increases the load on websites importing this data. Default value: 1
  • Queue Waiting Time Between Items: Waiting time in seconds between processed queue items. Decreasing the value causes your subscribing websites to have less time to finish processing queue items before more items send. Default value: 3 seconds

If you make any modifications to the entered values on this page, be sure to click Save Configuration to save your changes.

Processing the export queue

To process all items in the export queue, use one of the following methods:

  • User interface
    1. Sign in to your website as an administrator.
    2. Go to Configuration > Web Services > Acquia Content Hub.
    3. Click the Export Queue tab.
    4. In the Run Export Queue section, select the number of queue items to process.
    5. Click Submit.
  • Drush: Open a command prompt window, and then execute the following Drush command:

    queue-run acquia_contenthub_export_queue

Using the export queue to avoid callbacks

If the export queue is not configured to operate on a publisher, the export of content to Acquia Content Hub occurs during the same page request executing the entity action (create, update, delete). The process sends a resource URL to the Content Hub service, which comes back to the website on the same resource URL to retrieve the entity in CDF format.

Content Hub visits the website anonymously (with HMAC headers). This may cause the callback to fail if the website has a caching layer blocking Content Hub, or if PHP/HTTP authentication or the PHP shield Drupal module are enabled.

The export queue processing sends the CDF information directly to Content Hub in the same request instead of the resource URL. This eliminates the need for a callback to the website.

In this situation, enabling the export queue is an easy way to solve the issue. It’s possible to automate the execution of the export queue by configuring scheduled jobs which run the queue at specific time intervals.