<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 7:11 PM, antony <span dir="ltr"><<a href="mailto:antony.pulicken@gmail.com" target="_blank">antony.pulicken@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":jf" style="overflow:hidden">We have a scneario where in the consumer will create a temperory queue and<br>
wait on that queue till it gets a message from the publisher.</div></blockquote></div><br>I am curious... when is such a scenario needed? I don't think creating and destroying queues like this is going to be efficient in the long run, but it is a *very* common pattern in certain concurrency settings: You pass a one-message mailbox and synchronize on the response appearing in that mailbox. I've done this in several Haskell programs, but there I tend to reuse the mailbox so I don't run the overhead of creating/destroying it all the time as well.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Isn't there a clever way you can set up reply-queues and use correlation id's to achieve the same?<br><br clear="all"><div><br></div>-- <br>J.
</div></div>