implemented reading batches from ActiveMQ