Closed snichme closed 2 weeks ago
@spuun @carlhoerberg any thoughts about always including "default" exchange when getting bindings for a queue heere: https://github.com/cloudamqp/lavinmq/blob/publish-to-exchange/src/lavinmq/vhost.cr#L286 instead of adding the default in the http controllers
Im fine with that
@spuun agree, early return is nicer. Fixed all now I thinkg
Specs fails because of this: https://github.com/cloudamqp/amqp-client.cr/pull/48
WHAT is this pull request doing?
Move the logic of publishing a message to an exchange from Vhost to the exchange.
The idea came because of the need for the exchange to handle the messages differently for MQTT support but it has additional benefits like
@queue_bindings
and@exchange_bindings
can have different types and as you may see I've used only one "bindings" for both queue and exchange. for example for FanoutExchange it's just a@bindings : Set(Destination)
There is probably some more things that should move down to each subclass to make the code clearer and to support the different types that
@bindings
has now.HOW can this pull request be tested?
specs