Skip to content

Commit

Permalink
pub: each user stick to his topic
Browse files Browse the repository at this point in the history
  • Loading branch information
rende2005 committed May 26, 2017
1 parent 8dc23c2 commit 72ab8fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void testEnded(String arg0) {
@Override
public void testStarted() {
keepTime = Integer.parseInt(getConnKeepTime());
logger.info("Keeptime is: " + keepTime);
logger.info("*** Keeptime is: " + keepTime);
}

@Override
Expand Down
6 changes: 4 additions & 2 deletions mqtt_jmeter/src/main/java/net/xmeter/samplers/PubSampler.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class PubSampler extends AbstractMQTTSampler implements ThreadListener {
private String payload = null;
private String clientId = "";
private QoS qos_enum = QoS.AT_MOST_ONCE;
private String topicName = "";

public String getQOS() {
return getPropertyAsString(QOS_LEVEL, String.valueOf(QOS_0));
Expand Down Expand Up @@ -117,6 +118,9 @@ public SampleResult sample(Entry arg0) {
payload = Util.generatePayload(Integer.parseInt(getMessageLength()));
}

topicName = getTopic();
logger.info("*** topicName=" + topicName);

int qos = Integer.parseInt(getQOS());
switch (qos) {
case 0:
Expand All @@ -143,8 +147,6 @@ public SampleResult sample(Entry arg0) {
SampleResult result = new SampleResult();
result.setSampleLabel(getName());
try {
String topicName = getTopic();

byte[] toSend = new byte[]{};
byte[] tmp = new byte[]{};

Expand Down

0 comments on commit 72ab8fa

Please sign in to comment.