[rabbitmq-discuss] Direct vs Topic exchange - Question
Konstantin Kalin
konstantin.kalin at gmail.com
Thu May 3 20:45:20 BST 2012
Hello, Simon.
Thank you for looking at this. Sorry for causing troubles. Please see inline.
On May 3, 2012, at 3:12 AM, Simon MacMullen wrote:
> On 02/05/12 17:09, Konstantin Kalin wrote:
>
> OK, that's just a typo I assume, I'll change it to:
>
> Connection = connections:get_connection(),
>
Yep. It was typo.
>
> So it looks like the connection server is not getting started?
>
Yes. Connection was not created.
Actually I don't know why AMQP connections are not created if you start apps from command line using -s. It works fine when an app is started in Erlang shell using same "start" function.
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.
I have added comments for API methods in publisher.erl and consumer.erl. See attached file.
Here are steps that I use to start the test:
Consumer:
1) start_consumer.sh
2) consumer:start(["amqp://guest:guest@10.10.161.237:5672"]).
3) consumer:start_consumer(<<"topic">>, <<"topic">>).
Publisher:
1) start_publisher.sh
2) publisher:start(["amqp://guest:guest@10.10.161.237:5672"]).
3) publisher:start_publish(<<"topic">>, <<"topic">>, 1000, 1000).
Hope it will work now :)
I run several tests yesterday and got more confusing results:
Topic Exchange
1) 1 Consumer and 1 publisher - RabbitMQ shows ~10k per second. (4 times less than same test with Direct)
2) 10 Consumers and 10 publishers - RabbitMQ shows ~4k per second. (10 times less than same test with Direct).
3) 100 Consumers and 100 publishers - RabbitMQ shows same ~4k per second. (10 times less than same test with Direct).
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.
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
Thank you,
Kostya.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120503/b3f648e6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rabbitMQ.tar.gz
Type: application/x-gzip
Size: 481986 bytes
Desc: not available
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120503/b3f648e6/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120503/b3f648e6/attachment-0001.htm>
More information about the rabbitmq-discuss
mailing list