You are tasked with optimizing a stream processing pipeline for transactional purposes. Describe the steps you would take to achieve this, including the configurations you would adjust and the mechanisms you would put in place to ensure low latency and high throughput.