Reusing ClientSession, ClientProducer, and ClientConsumer
Please note that ClientSession, ClientProducer and ClientConsumer instances are designed to be re-used. It's an anti-pattern to create new ClientSession, ClientProducer and ClientConsumer instances for each message you produce or consume. If you do this, your application will perform very poorly. This is discussed further in the section on performance tuning Chapter 46, Performance Tuning.