some refactors on processor and writer to send multiple product, test improvements