Used persistence actor to persist message into SQL Server database. Initial message format is as in below. System run with this format few times and many of those messages were persisted. Currently I changed message format to include few attributes as in below. Can someone give me an idea how to solve this?
Problem currently I am facing is when recovering initial persist message with new changes it failed and giving errors like below.
“Persistence failure when replaying events for persistenceId [tz-persistent-factory]. Last known sequence number [0]”
public class PlacedMissionDataCommand : IEntityActorMessage
{
public PlacedMissionDataCommand(int trafficzoneId, int missionId, DateTime finishedTime)
{
TrafficzoneId = trafficzoneId;
MissionId = missionId;
FinishedTime = finishedTime;
TaskGroupId = taskGroupId;
TaskGroupActivated = taskGroupActivated;
TaskGroupCreated = taskGroupCreated;
TestData = testData;
}
public int TrafficzoneId { get; }
public int MissionId { get; private set; }
public DateTime FinishedTime { get; }
public string EntityId => TrafficzoneId.ToString();
}
After changes done to include few properties
public class PlacedMissionDataCommand : IEntityActorMessage
{
public PlacedMissionDataCommand(int trafficzoneId, int missionId, DateTime finishedTime, int taskGroupId, DateTime? taskGroupActivated, DateTime? taskGroupCreated)
{
TrafficzoneId = trafficzoneId;
MissionId = missionId;
FinishedTime = finishedTime;
TaskGroupId = taskGroupId;
TaskGroupActivated = taskGroupActivated;
TaskGroupCreated = taskGroupCreated;
}
public int TrafficzoneId { get; }
public int MissionId { get; private set; }
public DateTime FinishedTime { get; }
public int TaskGroupId { get; }
public DateTime? TaskGroupActivated { get; }
public DateTime? TaskGroupCreated { get; }
public string EntityId => TrafficzoneId.ToString();
}