From 215d869b51990057b7c01e15ec87ff8c0d7311f6 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 10 May 2012 11:46:16 -0400 Subject: [PATCH] Cope with Qpid brokenness --- amqp_relay.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/amqp_relay.ml b/amqp_relay.ml index bbd2560..d8d496a 100644 --- a/amqp_relay.ml +++ b/amqp_relay.ml @@ -282,6 +282,11 @@ let handle_method conn channel m = send_method conn channel Channel_close_ok; | Channel_close_ok -> return () + | Exchange_declare ("", type_, passive, durable, no_wait, arguments) -> + (* Qpid does this bizarre thing of declaring the default exchange. *) + if no_wait + then return () + else send_method conn channel Exchange_declare_ok | Exchange_declare (exchange, type_, passive, durable, no_wait, arguments) -> Node.send_ignore' "factory" (Message.create (Sexp.Str type_, Sexp.Arr [Sexp.Str exchange], @@ -294,6 +299,11 @@ let handle_method conn channel m = Sexp.Arr [Sexp.Str queue], Sexp.Str conn.name.Node.label, Sexp.Str "Queue_declare_reply")) + | Queue_bind (queue, "", routing_key, no_wait, arguments) -> + (* Qpid does this bizarre thing of binding to the default exchange. *) + if no_wait + then return () + else send_method conn channel Queue_bind_ok | Queue_bind (queue, exchange, routing_key, no_wait, arguments) -> let queue = expand_mrdq conn queue in if not (Node.approx_exists queue)