Make exchange and routing key options.

While here, move message creation out of the try/except block.