Should I keep using parallel stream here or should I go with sequential stream. I have tested it on various environments. In my local it was considerably fast but in the test environment, it was slower. doc is a list of strings of size 30K appx. Please suggest.
doc.parallelStream().filter(transaction -> StringUtils.isNotBlank(transaction))
.forEach(transaction -> sendTransactionsToTopic(transaction, isEncryptionEnabled))