def setup(self): """ Setup the broker model. """ if not self.managed: # not managed return url = self.plugin.url queue = Queue(self.queue) queue.auto_delete = self.expiration > 0 queue.expiration = self.expiration queue.declare(url) if self.exchange: exchange = Exchange(self.exchange) exchange.bind(queue, url)