How can a thread (recevier) write request & response to an file while thread(sender) will send only request?
<p>We have an requirement in which it causes an design constraint and it is show stopper. Here it is,</p>

<ol>
<li><p>Sender thread will put requests into the messaging queue. Input source is a text file that contains 10 million requests.</p></li>
<li><p>Recevier thread polls the responses from another queue and write it onto another output file.</p></li>
</ol>

<p>Design Constraint:</p>

<ol>
<li><p>Recevier thread has to write the request and response onto output file. <strong>How this is possible ?</strong></p></li>
<li><p>No Database should be used</p></li>
<li><p>Caching the request before sending and updating it after corresponding response has been recevied cannot be used because of performance bottleneck.</p></li>
<li><p>In few cases, timeout occurs if the response is delayed very long time.</p></li>
</ol>

<p>Please advice.</p>
