In my scenario I have one boroker, one producer, one consumer.I am using activemq for writing my app. logs to db.As u know writing logs to db is time taking process.That's why consumer is more and more slow than producer.For ex. I send 100.000 message(huge objects).Producer finishes sending messages in 20 mins.But When the producer finished, consumer has finished 4.000 message processing yet.
My question is ; is there any way to say procuder "wait if there are x messages in the broker waiting for consuming and try to send after a while"
how can solve this problem.