I know that the lastpublished and lastpublishedby properties are not used any more so I was wondering how can I set a custom property that says if a asset is unpublished or published?
Thank you for the help!
You can write a Replication PreProcessor and add the custom property to any assets that you replicate.
Please refer the sample code here.
You should not do that, because these properties are an implementation detail of AEM, and are only set by the replication (subsystem).
Why do you need to set the replication state from your own code?