[no jira] make networkConsumerIds visible in toString of consumerinfo to aid tracing consumers in a network via transport trace logging

This commit is contained in:
gtully 2017-07-07 16:01:49 +01:00
parent 1f48314395
commit 499347542c
1 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,7 @@
package org.apache.activemq.command;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@ -532,4 +533,11 @@ public class ConsumerInfo extends BaseCommand implements TransientInitializer {
lastDeliveredSequenceId = RemoveInfo.LAST_DELIVERED_UNSET;
}
@Override
public String toString() {
HashMap<String, Object> overrideFields = new HashMap<String, Object>();
overrideFields.put("networkConsumerIds", networkConsumerIds);
return super.toString(overrideFields);
}
}