Sending a regular message is paused when working with custom tokens

  • Dispatch of a regular message may be paused when working with custom tokens because it is not thread-safe. The following error can be found in the log records:

    MessageTaskRunner worker thread 7 
    ERROR Message sending error: System.ArgumentException: An item with the same key has already been added. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Sitecore.Modules.EmailCampaign.Core.Dispatch.DispatchManager.RestoreCustomTokensFromQueue(MessageItem message, Dictionary`2 customPersonTokens) at Sitecore.Modules.EmailCampaign.Core.Dispatch.DispatchTask.GenerateEmailContent(Recipient recipient, String emailAddress, Language language, Guid recipientId, Dictionary`2 customPersonTokens, DateTime& startGetPageTime, DateTime& endGetPageTime, DateTime& startCollectFilesTime, DateTime& endCollectFilesTime) at Sitecore.Modules.EmailCampaign.Core.Dispatch.DispatchTask.OnSendToNextRecipient()

Applies to:

EXM 3.2 Update-1 - 3.4 Update-2

EXM 3.5

January 22, 2020
January 22, 2020

Reference number:



  • EXM