Corrected the code to configure a producer with a queue rather than an exchange when appropriate.