Switched from Moquette's MQTT codec to Netty's MQTT codec ones
This commit is contained in:
@@ -4,6 +4,8 @@ import io.moquette.interception.messages.InterceptPublishMessage;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import static io.moquette.spi.impl.Utils.readBytesAndRewind;
|
||||
|
||||
/**
|
||||
* Created by mackristof on 28/05/2016.
|
||||
*/
|
||||
@@ -11,22 +13,22 @@ public class HazelcastMsg implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1431584750134928273L;
|
||||
private final String clientId;
|
||||
private final byte qos;
|
||||
private final int qos;
|
||||
private final byte[] payload;
|
||||
private final String topic;
|
||||
|
||||
public HazelcastMsg(InterceptPublishMessage msg) {
|
||||
this.clientId = msg.getClientID();
|
||||
this.topic = msg.getTopicName();
|
||||
this.qos = msg.getQos().byteValue();
|
||||
this.payload = msg.getPayload().array();
|
||||
this.qos = msg.getQos().value();
|
||||
this.payload = readBytesAndRewind(msg.getPayload());
|
||||
}
|
||||
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public byte getQos() {
|
||||
public int getQos() {
|
||||
return qos;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user