If the consumer will never be used out of the producer's scope, then you could also move its creation in the producer's constructor..