<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<style type="text/css">.mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}
</style></head><body style="">
<div>
Hi,
</div>
<div>
 
</div>
<div>
We are trying to use RabbitMQ in a java application we are working on. The use case is straight forward - 
</div>
<div>
 
</div>
<div>
Upon a business event trigger, we need to execute business process on thousands of rows in the database. So we want to use a
</div>
<div>
queueing mechanism where the publisher publishes a message for each record that need to be processed (thousands of messages).
</div>
<div>
We want to process these messages using multiple consumers in parallel.
</div>
<div>
 
</div>
<div>
Based on what I have seen in the samples we will have to run as many instances of worker.java as the number of consumers we
</div>
<div>
would need. Is this correct? If so what are the best practices in doing the same in java (from a deployment perspective)?
</div>
<div>
 
</div>
<div>
I am also thinking having one worker.java spawning multiple threads and each thread would register with the queue as a different
</div>
<div>
consumer. Is this possible? If so any pitfalls we need to be aware of?
</div>
<div>
 
</div>
<div>
Any information will be of great help..
</div>
<div>
 
</div>
<div>
Thanks
</div>
<div>
Rajesh
</div>
</body></html>