Added exchange type provider and made the call to routing key provider safe.