2222import java .net .URISyntaxException ;
2323import java .security .KeyManagementException ;
2424import java .security .NoSuchAlgorithmException ;
25- import java .util .ArrayList ;
26- import java .util .Collection ;
2725import java .util .HashSet ;
2826import java .util .List ;
2927import java .util .Random ;
@@ -76,7 +74,6 @@ public void run() throws IOException, InterruptedException, TimeoutException, No
7674 public void run (boolean announceStartup )
7775 throws IOException , InterruptedException , TimeoutException , NoSuchAlgorithmException , KeyManagementException , URISyntaxException {
7876 Set <String > queueNames = new HashSet <>();
79- Collection <Consumer > consumers = new ArrayList <>();
8077 Thread [] consumerThreads = new Thread [params .getConsumerThreadCount ()];
8178 Connection [] consumerConnections = new Connection [params .getConsumerCount ()];
8279 for (int i = 0 ; i < consumerConnections .length ; i ++) {
@@ -91,7 +88,6 @@ public void run(boolean announceStartup)
9188 System .out .println ("id: " + testID + ", starting consumer #" + i + ", channel #" + j );
9289 }
9390 Consumer consumer = params .createConsumer (conn , stats , routingKey );
94- consumers .add (consumer );
9591 queueNames .addAll (consumer .getQueueNames ());
9692 Thread t = new Thread (consumer );
9793 consumerThreads [(i * params .getConsumerChannelCount ()) + j ] = t ;
@@ -115,12 +111,6 @@ public void run(boolean announceStartup)
115111 producersRoutingKey = this .routingKey ;
116112 }
117113
118- // consumers need the publishing routing key to match it against
119- // against the received message and update the stats
120- for (Consumer consumer : consumers ) {
121- consumer .setRoutingKey (producersRoutingKey );
122- }
123-
124114 Thread [] producerThreads = new Thread [params .getProducerThreadCount ()];
125115 Connection [] producerConnections = new Connection [params .getProducerCount ()];
126116 for (int i = 0 ; i < producerConnections .length ; i ++) {
0 commit comments