[rabbitmq-discuss] simple.publish over the JSON RPC interface
Cuong Le
cuonglb at facemain.com
Mon Aug 3 08:51:12 BST 2009
Hi,
You must re-check exchange type of it (this is a topic exchange) and
consumer code (make exchange/queue, and bind exchange with queue).
* gen_server make proc cast for a long time and until timeout it will arise
error {error, timeout}.
Cuong
On Fri, Jul 31, 2009 at 6:28 AM, Nathan Gray <n8gray at n8gray.org> wrote:
> I'm trying to use the rabbitmq-http2 bridge to create exchanges and
> send messages to them via http/jsonrpc. Creating an exchange works
> fine but sending a message doesn't. I'm using a simple python client
> and I've generated the following request object:
>
> {"version":"1.1",
> "method": "cast",
> "params": [
> "basic.publish",
> [1, "amq.topic", "this.that", false, false],
> "Hello world!",
> [null, null, null, null, null, null, null, null, null, null, null,
> null, null, null]],
> "id": 0}
>
> AFAICT this is essentially the same as the example given in this posting:
> http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-April/003882.html
>
> But this is what I get as a response (sorry for the formatting):
>
> {"version":"1.1",
> "id":0,
> "error":
> { "name":"JSONRPCError",
> "code":500,
> "message":"Internal error",
> "error":"{timeout,\n {gen_server,call,\n [<0.432.0>,\n
> {jsonrpc,<<\"cast\">>,\n {obj,\n
> [{\"http_method\",<<\"POST\">>},\n
> {\"http_query_parameters\",{obj,[]}},\n
> {\"http_headers\",\n {obj,\n
> [{\"user-agent\",<<\"python\">>},\n
> {\"accept\",<<\"application/json\">>},\n
> {\"content-type\",<<\"application/json\">>},\n
> {\"content-length\",<<\"220\">>},\n
> {\"accept-encoding\",<<\"identity\">>},\n
> {\"host\",<<\"localhost:55672\">>}]}},\n
> {\"remote_port\",61595},\n
> {\"remote_peername\",<<\"0:0:0:0:0:0:0:1\">>},\n
> {\"scheme\",<<\"http\">>}]},\n [<<\"basic.publish\">>,\n
> [1,<<\"amq.topic\">>,<<\"this.that\">>,false,false],\n
> <<\"Hello world!\">>,\n
> [null,null,null,null,null,null,null,null,null,null,null,null,\n
> null,null]]}]}}"
> }}
>
> Can anybody explain what I've done wrong?
>
> Thanks!
> -n8
>
> PS: Please CC me with replies.
>
> --
> http://n8gray.org
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090803/86819f28/attachment.htm
More information about the rabbitmq-discuss
mailing list