Defined constant for client's number of messages published
This commit is contained in:
@@ -15,8 +15,6 @@ import org.slf4j.LoggerFactory;
|
|||||||
*/
|
*/
|
||||||
public class Consumer implements Runnable {
|
public class Consumer implements Runnable {
|
||||||
|
|
||||||
static final int PUB_LOOP = 10000;
|
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Consumer.class);
|
private static final Logger LOG = LoggerFactory.getLogger(Consumer.class);
|
||||||
|
|
||||||
private String m_clientID;
|
private String m_clientID;
|
||||||
@@ -54,7 +52,7 @@ public class Consumer implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Message message = null;
|
Message message = null;
|
||||||
for (int i = 0; i < PUB_LOOP; i++) {
|
for (int i = 0; i < Producer.PUB_LOOP; i++) {
|
||||||
try {
|
try {
|
||||||
message = connection.receive();
|
message = connection.receive();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class Producer implements Runnable {
|
|||||||
|
|
||||||
private String m_clientID;
|
private String m_clientID;
|
||||||
|
|
||||||
static final int PUB_LOOP = 10000;
|
public static final int PUB_LOOP = 1000000;
|
||||||
|
|
||||||
public Producer(String clientID) {
|
public Producer(String clientID) {
|
||||||
m_clientID = clientID;
|
m_clientID = clientID;
|
||||||
|
|||||||
Reference in New Issue
Block a user