}
public MQClientFactory getAndCreateMQClientFactory(final ClientConfig clientConfig) {
String clientId = clientConfig.buildMQClientId();
MQClientFactory factory = this.factoryTable.get(clientId);
if (null == factory) {
factory =
new MQClientFactory(clientConfig.cloneClientConfig(),
this.factoryIndexGenerator.getAndIncrement(), clientId);
MQClientFactory prev = this.factoryTable.putIfAbsent(clientId, factory);
if (prev != null) {
factory = prev;
}
else {
// TODO log