Sitecore Publishing Service 7.0 Multiple Publishing Targets
If you use the Sitecore Publishing Service and want multiple publishing targets (beyond the default Internet target), its critical to ensure that the configuration in the publishing service is set for your target.
After you create the desired publishing target in your CMS (using: Create a publishing target | Sitecore Documentation) head over to the publishing service.
This is where there is some confusion, as in the installation guide for the Sitecore Publishing Service 7.0, the example patch config is split across multiple examples versus a unified configuration: Sitecore Downloads: Sitecore Publishing Service 7020
Particularly the following instruction in section “4.1 Publishing Targets” require some interpretation:
Schema and ItemRevision Command Services must be configured with the same settings. Change the node to and accordingly.
Sitecore Publishing Service
Installation and Configuration Guide 7.0
What this actually means is that your patch file requires 3 nodes repeated… but changed for the Schema and ItemRevision commands. Here is a sample configuration you can leverage assuming your publishing target is named “web2”. I placed mine in \wwwroot\sitecoreruntime\Production\config within the publishing service.
Beyond the config below, follow section 4.1 of the Sitecore Publishing Service guide, as you will need to complete a few other steps, including a patch on your CMS.
<?xml version="1.0" encoding="UTF-8"?>
<Settings>
<Commands>
<Web>
<Services>
<Add>
<DefaultConnectionFactory>
<Options>
<Connections>
<Web2>
<Type>Sitecore.Framework.Publishing.Data.AdoNet.SqlDatabaseConnection, Sitecore.Framework.Publishing.Data</Type>
<LifeTime>Transient</LifeTime>
<Options>
<ConnectionString>Web2</ConnectionString>
<DefaultCommandTimeout>120</DefaultCommandTimeout>
<Behaviours>
<backend>sql-backend-default</backend>
<api>sql-api-default</api>
</Behaviours>
</Options>
</Web2>
<Web2Resources>
<Type>Sitecore.Framework.Publishing.Data.ResourceItems.ResourceConnection, Sitecore.Framework.Publishing.Data.ResourceItems</Type>
<LifeTime>Transient</LifeTime>
<Options>
<Paths>
<Sitecore>items/sitecore/web2</Sitecore>
<Modules>items/modules/web2</Modules>
</Paths>
</Options>
</Web2Resources>
</Connections>
</Options>
</DefaultConnectionFactory>
<StoreFactory>
<Options>
<Stores>
<Targets>
<Web2>
<Type>Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data</Type>
<ConnectionNames>
<Web2Database>Web2</Web2Database>
<Web2Resources>Web2Resources</Web2Resources>
</ConnectionNames>
<FeaturesListName>TargetStoreFeatures</FeaturesListName>
<Id>2D92562D-6B43-460A-9437-5714BBC9E58E</Id>
<ScDatabase>Web2</ScDatabase>
</Web2>
</Targets>
</Stores>
</Options>
</StoreFactory>
</Add>
</Services>
</Web>
<Schema>
<Services>
<Add>
<DefaultConnectionFactory>
<Options>
<Connections>
<Web2>
<Type>Sitecore.Framework.Publishing.Data.AdoNet.SqlDatabaseConnection, Sitecore.Framework.Publishing.Data</Type>
<LifeTime>Transient</LifeTime>
<Options>
<ConnectionString>Web2</ConnectionString>
<DefaultCommandTimeout>120</DefaultCommandTimeout>
<Behaviours>
<backend>sql-backend-default</backend>
<api>sql-api-default</api>
</Behaviours>
</Options>
</Web2>
<Web2Resources>
<Type>Sitecore.Framework.Publishing.Data.ResourceItems.ResourceConnection, Sitecore.Framework.Publishing.Data.ResourceItems</Type>
<LifeTime>Transient</LifeTime>
<Options>
<Paths>
<Sitecore>items/sitecore/web2</Sitecore>
<Modules>items/modules/web2</Modules>
</Paths>
</Options>
</Web2Resources>
</Connections>
</Options>
</DefaultConnectionFactory>
<StoreFactory>
<Options>
<Stores>
<Targets>
<Web2>
<Type>Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data</Type>
<ConnectionNames>
<Web2Database>Web2</Web2Database>
<Web2Resources>Web2Resources</Web2Resources>
</ConnectionNames>
<FeaturesListName>TargetStoreFeatures</FeaturesListName>
<Id>2D92562D-6B43-460A-9437-5714BBC9E58E</Id>
<ScDatabase>Web2</ScDatabase>
</Web2>
</Targets>
</Stores>
</Options>
</StoreFactory>
</Add>
</Services>
</Schema>
<ItemRevision>
<Services>
<Add>
<DefaultConnectionFactory>
<Options>
<Connections>
<Web2>
<Type>Sitecore.Framework.Publishing.Data.AdoNet.SqlDatabaseConnection, Sitecore.Framework.Publishing.Data</Type>
<LifeTime>Transient</LifeTime>
<Options>
<ConnectionString>Web2</ConnectionString>
<DefaultCommandTimeout>120</DefaultCommandTimeout>
<Behaviours>
<backend>sql-backend-default</backend>
<api>sql-api-default</api>
</Behaviours>
</Options>
</Web2>
<Web2Resources>
<Type>Sitecore.Framework.Publishing.Data.ResourceItems.ResourceConnection, Sitecore.Framework.Publishing.Data.ResourceItems</Type>
<LifeTime>Transient</LifeTime>
<Options>
<Paths>
<Sitecore>items/sitecore/web2</Sitecore>
<Modules>items/modules/web2</Modules>
</Paths>
</Options>
</Web2Resources>
</Connections>
</Options>
</DefaultConnectionFactory>
<StoreFactory>
<Options>
<Stores>
<Targets>
<Web2>
<Type>Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data</Type>
<ConnectionNames>
<Web2Database>Web2</Web2Database>
<Web2Resources>Web2Resources</Web2Resources>
</ConnectionNames>
<FeaturesListName>TargetStoreFeatures</FeaturesListName>
<Id>2D92562D-6B43-460A-9437-5714BBC9E58E</Id>
<ScDatabase>Web2</ScDatabase>
</Web2>
</Targets>
</Stores>
</Options>
</StoreFactory>
</Add>
</Services>
</ItemRevision>
</Commands>
</Settings>