diff options
author | Tony Garnock-Jones <tonyg@kcbbs.gen.nz> | 2009-01-15 14:13:25 +1300 |
---|---|---|
committer | Tony Garnock-Jones <tonyg@kcbbs.gen.nz> | 2009-01-15 14:13:25 +1300 |
commit | 3111476762c0206c18d77ffc56745fcdeb5da26b (patch) | |
tree | 0b18b430a7100e67587344c6cbf5e0128b16f335 /src/rabbit_exchange.erl | |
parent | 148f266ab03fd1b84a556df064cb5ff5cc0883ae (diff) | |
download | rabbitmq-server-3111476762c0206c18d77ffc56745fcdeb5da26b.tar.gz |
Add "amq.match" builtin exchange; accept "headers" in exchange.declare; and
stub out routing implementation for headers exchanges.
Diffstat (limited to 'src/rabbit_exchange.erl')
-rw-r--r-- | src/rabbit_exchange.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index 925c335c..03478a4d 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -145,6 +145,8 @@ check_type(<<"direct">>) -> direct; check_type(<<"topic">>) -> topic; +check_type(<<"headers">>) -> + headers; check_type(T) -> rabbit_misc:protocol_error( command_invalid, "invalid exchange type '~s'", [T]). @@ -252,6 +254,9 @@ route(#exchange{name = Name, type = topic}, RoutingKey) -> topic_matches(BindingKey, RoutingKey)] end); +route(X = #exchange{type = headers}, _RoutingKey) -> + exit(headers_unimplemented); + route(X = #exchange{type = fanout}, _) -> route_internal(X, '_'); |