My service selects records from DB (in this case 50K) which are PGP encrypted. I then loop over each record, decrypt and append each record to a file. Once all records are appended ...the file is PGP encrypted.
This design is slowing down my process.
Select all records and publish each to broker. Trigger invokes concurrent threads which decrypt and append each record to a file (not sure if it leads to file locking problems).
Any suggestions would be appreciated.