We need to read the transport package(on publisher) when a page is published. The package is deleted immediately. Is there a way to retain the package for a longer duration? We have different servers for publisher and deployer. I want to retain the package on publisher side.
Yes, modify your
cd_deployer_conf.xml to have
Cleanup="false" in the Queue Location configuration:
<Queue> <Location Path="c:\tridion\incoming" WindowSize="20" Workers="10" Cleanup="false" Interval="2s"/> </Queue>
Now restart the deployer and start publishing.
To capture information about every Publish Transaction made I think you need to check out the appropriate Event Handlers, they can indicate exactly when and what is rendered and published.
If I'm not mistaking the Transport Package itself is not part of the public API, which I why you will see there aren't many things documented about it. Rather than trying to use an internal implementation detail (the transport package), you can better look at a Storage Extension in case you are interested in what is exactly deployed. More info can be found in this article for one.
To achieve inspection of the transport package on the publisher side, I guess you could go down the route of implementing custom transport (login required), but it seems to me to be an unusual way to solve the problem of logging publish events.
An alternative, more common, solution might be to implement an Event handler that captures and logs publishing events.
Seeing that no answer was ever marked as accepted I thought I'd resurect this and try and help anyone else with the same problem. In my case the publisher packages weren't being deleted and therefore filling up the server, so my scenario appears to be exactly what the OP is after.
In our environment we run the transport service under a different account and I’ve discovered now that this account didn't have the required permissions to delete the package files from the Root Storage Folder once a publish completed. After I gave the account the necessary permissions the packages were automatically cleaned up as they're supposed to be.
Therefore I'd suggest the solution to the OPs question is to either change the account the transport service runs under ensuring it doesn't have delete permissions to your configured Root Storage Folder or explicitly deny delete permissions to the default transport service account.
We had similar requirement where we wanted to capture the package so that we can store the details of items published into database. We did not wanted to use event system as it might add some time to the publish transaction.
The approach we used was:
- Created windows service with file watcher, which will continuously monitor the location of package creation
- as soon as package is created it will copy the package to other location so that even if package is deleted we still have a copy of it to work with.
- Extract the information required from the package and delete the package.