Hi,<br><br>You must re-check exchange type of it (this is a topic exchange) and consumer code (make exchange/queue, and bind exchange with queue).<br><br>* gen_server make proc cast for a long time and until timeout it will arise error {error, timeout}.<br>
<br>Cuong<br><br><div class="gmail_quote">On Fri, Jul 31, 2009 at 6:28 AM, Nathan Gray <span dir="ltr"><<a href="mailto:n8gray@n8gray.org">n8gray@n8gray.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm trying to use the rabbitmq-http2 bridge to create exchanges and<br>
send messages to them via http/jsonrpc. Creating an exchange works<br>
fine but sending a message doesn't. I'm using a simple python client<br>
and I've generated the following request object:<br>
<br>
{"version":"1.1",<br>
"method": "cast",<br>
"params": [<br>
"basic.publish",<br>
[1, "amq.topic", "this.that", false, false],<br>
"Hello world!",<br>
[null, null, null, null, null, null, null, null, null, null, null,<br>
null, null, null]],<br>
"id": 0}<br>
<br>
AFAICT this is essentially the same as the example given in this posting:<br>
<a href="http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-April/003882.html" target="_blank">http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-April/003882.html</a><br>
<br>
But this is what I get as a response (sorry for the formatting):<br>
<br>
{"version":"1.1",<br>
"id":0,<br>
"error":<br>
{ "name":"JSONRPCError",<br>
"code":500,<br>
"message":"Internal error",<br>
"error":"{timeout,\n {gen_server,call,\n [<0.432.0>,\n<br>
{jsonrpc,<<\"cast\">>,\n {obj,\n<br>
[{\"http_method\",<<\"POST\">>},\n<br>
{\"http_query_parameters\",{obj,[]}},\n<br>
{\"http_headers\",\n {obj,\n<br>
[{\"user-agent\",<<\"python\">>},\n<br>
{\"accept\",<<\"application/json\">>},\n<br>
{\"content-type\",<<\"application/json\">>},\n<br>
{\"content-length\",<<\"220\">>},\n<br>
{\"accept-encoding\",<<\"identity\">>},\n<br>
{\"host\",<<\"localhost:55672\">>}]}},\n<br>
{\"remote_port\",61595},\n<br>
{\"remote_peername\",<<\"0:0:0:0:0:0:0:1\">>},\n<br>
{\"scheme\",<<\"http\">>}]},\n [<<\"basic.publish\">>,\n<br>
[1,<<\"amq.topic\">>,<<\"this.that\">>,false,false],\n<br>
<<\"Hello world!\">>,\n<br>
[null,null,null,null,null,null,null,null,null,null,null,null,\n<br>
null,null]]}]}}"<br>
}}<br>
<br>
Can anybody explain what I've done wrong?<br>
<br>
Thanks!<br>
-n8<br>
<br>
PS: Please CC me with replies.<br>
<font color="#888888"><br>
--<br>
<a href="http://n8gray.org" target="_blank">http://n8gray.org</a><br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</font></blockquote></div><br>