I am new to Activemq
and Java
,I read tutorials,somewhat I understand.can anyone help me to solve the following task.
Imagine we have a 10 messages in Queue/Topic of Activemq. we are getting messages from Database,we already did it.
I want to write 2 Java Applications (using JMS for receiving messages from activemq ) that will act as a consumer in Activemq. What i want to achieve out of this is that whenever Activemq
get messages from Database, activemq should check if any consumer is free or not.If any consumer is free activemq should push message to consumer,once consumer receives it will do its own processing.
So how should my java code be inorder to achieve this?
Also how to set the prefetch limit?
can anyone help me.
Thanks.