<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello, Simon.<div><br></div><div>Thank you for looking at this. Sorry for causing troubles. Please see inline.</div><div><br><div><div>On May 3, 2012, at 3:12 AM, Simon MacMullen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 02/05/12 17:09, Konstantin Kalin wrote:<br><br>OK, that's just a typo I assume, I'll change it to:<br><br> Connection = connections:get_connection(),<br><br></div></blockquote>Yep. It was typo. </div><div><br><blockquote type="cite"><div><br>So it looks like the connection server is not getting started?<br><br></div></blockquote>Yes. Connection was not created. </div><div>Actually I don't know why AMQP connections are not created if you start apps from command line using <b>-s</b>. It works fine when an app is started in Erlang shell using same "start" function.</div><div><br></div><div>I created start_publisher.sh and start_consumer.sh scripts. The scripts don't start the application actually. But they put proper ERL_LIBS and search path. Publisher and Consumer apps cannot work in same Erlang VMs because each app tries to create own Connection pool.</div><div><br></div><div>I have added comments for API methods in publisher.erl and consumer.erl. See attached file. </div><div><br></div><div>Here are steps that I use to start the test:</div><div><u>Consumer</u>:</div><div>1) start_consumer.sh</div><div>2) consumer:start(["<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><a href="amqp://guest:guest@10.10.161.237:5672">amqp://guest:guest@10.10.161.237:5672</a>"]).</span> </div><div>3) consumer:start_consumer(<<"topic">>, <<"topic">>).</div><div><u>Publisher</u>:</div><div>1) start_publisher.sh</div><div>2) publisher:start([<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; ">"<a href="amqp://guest:guest@10.10.161.237:5672">amqp://guest:guest@10.10.161.237:5672</a>"]).</span><br>3) publisher:start_publish(<<"topic">>, <<"topic">>, 1000, 1000).</div><div><br></div><div>Hope it will work now :)</div><div><br></div><div>I run several tests yesterday and got more confusing results:</div><div>Topic Exchange</div><div>1) 1 Consumer and 1 publisher - RabbitMQ shows ~10k per second. (4 times less than same test with Direct)</div><div>2) 10 Consumers and 10 publishers - RabbitMQ shows ~4k per second. (10 times less than same test with Direct). </div><div>3) 100 Consumers and 100 publishers - RabbitMQ shows same ~4k per second. (10 times less than same test with Direct). </div><div><br></div><div>And I see "Flow control" on Publisher connections. CPU is ~300% and Memory is ~300kb (VM is 8 CPU and 4Gb). So VM machine is slightly loaded. </div><div><br></div><div><blockquote type="cite"><div><br>Cheers, Simon<br><br>-- <br>Simon MacMullen<br>RabbitMQ, VMware<br></div></blockquote><br></div><div>Thank you,</div><div>Kostya. </div><div></div></div></body></html>