Created
December 8, 2012 19:06
-
-
Save manpages/4241430 to your computer and use it in GitHub Desktop.
debugging fubbit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PID = fubbit:proxy([{host, "127.0.0.1"}, {port, 56695}], [<<"no">>], self()). | |
fubbit_connection:mq_run(PID, [{action, <<"queue.declare">>}], [{queue, <<"it_works">>}]). | |
%% more snippets: | |
QDec = fbbbit_records:'#new-queue.declare'(). | |
[ {X, fubbit_records:'#get-'(X, QDec)} || X <- fubbit_records:'#info-'('queue.declare', fields)]. | |
%% publish something already! | |
% fubbit_connection:mq_run(PID, [{action, <<"basic.publish">>}, {payload, <<"amqp_msg">>}], [{routing_key, <<"it_works">>}], [{payload, <<"a special plan">>}]). | |
fubbit_connection:mq_run(PID, | |
[{action, <<"basic.publish">>}, {payload, <<"amqp_msg">>}], | |
[{routing_key, <<"it_works">>}], | |
[{payload, <<"a special plan">>}] | |
). | |
%% a perfect example of consumerism | |
fubbit_connection:mq_run(PID, [{action, <<"basic.get">>}], [{queue, <<"it_works">>}, {no_ack, true}]). |
And now the bug with validating output is fixed:
2> fubbit_connection:mq_run(PID, [{action, <<"queue.declare">>}], [{queue, <<"it_works">>}]).
running binary_to_existing_atom with
<<"#new-queue.declare_ok">>
ouch
calling the rabbit
the children always followed himok
And in rabbitmqctl:
Every 2.0s: sudo rabbitmqctl list_queues Sat Dec 8 21:13:32 2012
Listing queues ...
it_works 0
...done.
I'll remove debug output after one more cycle of tests.
Yay, shit works and tested. I still have to write a nice proxy but so far that thing is usable from Elixir, which is nice.
Every 2.0s: sudo rabbitmqctl list_queues Sat Dec 8 23:26:07 2012
Listing queues ...
it_works 1
it_works1 0
...done.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
F*ck yeah: