I understand, thank you. I&#39;ll try to improve it until I can do something better with credit flow.<div><br><div class="gmail_quote">2012/8/3 Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 03/08/12 09:45, F�lix L�pez wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Let me check.<br>
<br>
Regarding the throttling:<br>
It&#39;s a temporary solution, I&#39;d like to try to do good one with credit<br>
flow, but later.<br>
<br>
It preserves the order in what they arrive, so when a message for the<br>
exchange Test1 arrives a process is spawned with a timeout, the next<br>
message for the same exchange takes into that time, so it calculates its<br>
timeout basing on it.<br>
</blockquote>
<br></div>
In your code each message is passed on via a freshly spawned process. Erlang only guarantees message order between pairs of processes. What you have will work most of the time, particularly when message rates are low, but there is no guarantee.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
About the rate limit with multiple concurrent publishers, why not? It<br>
stores the next timeout in a transaction, so the next message should<br>
calculate its timeout taking into account the previous message.<br>
</blockquote>
<br></div>
The reading of the previous timeout and writing of the new timeout happen in different transactions. So multiple concurrent publishers could all read the same value.<span class="HOEnZb"><font color="#888888"><br>
<br>
Matthias.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://www.linkedin.com/in/flopezluis" target="_blank">http://www.linkedin.com/in/flopezluis</a><br><br>It&#39;s easier to ask forgiveness than it is to get permission<br>
<br><br>&quot;.....it doesn&#39;t matter how many times you fail. It doesn&#39;t matter how many times you almost get it right. No one is going to know or care about your failures, and either should you. All you have to do is learn from them and those around you because...All that matters in business is that you get it right once. Then everyone can tell you how lucky you are.&quot;<br>
--Mark Cuban&quot;<br><br>&quot;Always be the worst guy in every band you&#39;re in.&quot; If you&#39;re the best guy there, you need to be in a different band. And I think that works for almost everything that&#39;s out there as well.&quot; Pat Metheny<br>

</div>