Completed the exporting into broker module
This commit is contained in:
+6
-7
@@ -25,11 +25,11 @@
|
||||
<version>2.0.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!--dependency>
|
||||
<groupId>com.googlecode.disruptor</groupId>
|
||||
<artifactId>disruptor</artifactId>
|
||||
<version>2.7.1</version>
|
||||
</dependency>
|
||||
</dependency -->
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
@@ -44,11 +44,11 @@
|
||||
<version>1.6.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!--dependency>
|
||||
<groupId>org.fusesource.hawtdb</groupId>
|
||||
<artifactId>hawtdb</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
</dependency-->
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
@@ -65,10 +65,9 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!--dependency>
|
||||
<groupId>org.fusesource.mqtt-client</groupId>
|
||||
<artifactId>mqtt-client</artifactId>
|
||||
<!-- <version>1.4-SNAPSHOT</version>-->
|
||||
<version>1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -77,7 +76,7 @@
|
||||
<groupId>org.fusesource.hawtbuf</groupId>
|
||||
<artifactId>hawtbuf</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
</dependency-->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.dna.mqtt.commons;
|
||||
|
||||
/**
|
||||
* Contains some usefull constants.
|
||||
*/
|
||||
public class Constants {
|
||||
public static final int PORT = 1883;
|
||||
public static final int DEFAULT_CONNECT_TIMEOUT = 10;
|
||||
}
|
||||
@@ -19,6 +19,7 @@ import org.apache.mina.filter.codec.ProtocolCodecFilter;
|
||||
import org.apache.mina.filter.codec.demux.DemuxingProtocolDecoder;
|
||||
import org.apache.mina.filter.codec.demux.DemuxingProtocolEncoder;
|
||||
import org.apache.mina.transport.socket.nio.NioSocketConnector;
|
||||
import org.dna.mqtt.commons.Constants;
|
||||
import org.dna.mqtt.commons.MessageIDGenerator;
|
||||
import org.dna.mqtt.moquette.ConnectionException;
|
||||
import org.dna.mqtt.moquette.MQTTException;
|
||||
@@ -34,7 +35,6 @@ import org.dna.mqtt.moquette.proto.messages.PingReqMessage;
|
||||
import org.dna.mqtt.moquette.proto.messages.PublishMessage;
|
||||
import org.dna.mqtt.moquette.proto.messages.SubscribeMessage;
|
||||
import org.dna.mqtt.moquette.proto.messages.UnsubscribeMessage;
|
||||
import org.dna.mqtt.moquette.server.Server;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -128,7 +128,7 @@ public final class Client {
|
||||
|
||||
m_connector.setHandler(new ClientMQTTHandler(this));
|
||||
m_connector.getSessionConfig().setReadBufferSize(2048);
|
||||
m_connector.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, Server.DEFAULT_CONNECT_TIMEOUT);
|
||||
m_connector.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, Constants.DEFAULT_CONNECT_TIMEOUT);
|
||||
|
||||
m_scheduler = Executors.newScheduledThreadPool(NUM_SCHEDULER_TIMER_THREAD);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user