Reactor and heat exchanger