Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aep-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
aep-platform
Commits
febb2c69
Commit
febb2c69
authored
3 years ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置文件
parent
b65a8129
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
iot-broker/mqtt-broker/pom.xml
iot-broker/mqtt-broker/pom.xml
+0
-1
iot-broker/mqtt-broker/src/main/java/com/mortals/MQServer.java
...roker/mqtt-broker/src/main/java/com/mortals/MQServer.java
+8
-1
iot-broker/mqtt-broker/src/main/java/com/mortals/mqtt/broker/common/config/BrokerConfig.java
...a/com/mortals/mqtt/broker/common/config/BrokerConfig.java
+4
-4
iot-broker/pom.xml
iot-broker/pom.xml
+1
-2
No files found.
iot-broker/mqtt-broker/pom.xml
View file @
febb2c69
...
...
@@ -5,7 +5,6 @@
<parent>
<artifactId>
mqtt
</artifactId>
<groupId>
com.mortals
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
This diff is collapsed.
Click to expand it.
iot-broker/mqtt-broker/src/main/java/com/mortals/MQServer.java
View file @
febb2c69
...
...
@@ -28,9 +28,16 @@ public class MQServer {
public
static
void
main
(
String
[]
args
)
{
try
{
//String filePath = MQServer.class.getClassLoader().getResource("conf//mq.properties").getPath();
//System.out.println("filePath:"+filePath);
//启动mqtt service
startMqttService
(
args
);
//启动coap service
//todo 启动coap service
//todo 启动http服务
}
catch
(
Exception
e
)
{
log
.
error
(
"mqtt start failure,cause = "
,
e
);
System
.
exit
(-
1
);
...
...
This diff is collapsed.
Click to expand it.
iot-broker/mqtt-broker/src/main/java/com/mortals/mqtt/broker/common/config/BrokerConfig.java
View file @
febb2c69
package
com.mortals.mqtt.broker.common.config
;
import
com.codahale.metrics.MetricRegistry
;
import
com.mortals.MQServer
;
import
lombok.Data
;
import
java.io.File
;
...
...
@@ -12,8 +13,7 @@ import java.io.File;
public
class
BrokerConfig
{
// 配置conf文件的所在位置,logback,properties文件等所在位置
private
String
mqttHome
=
System
.
getenv
(
"MQTT_HOME"
)
!=
null
?
System
.
getenv
(
"MQTT_HOME"
)
:
System
.
getProperty
(
"user.dir"
)
+
File
.
separator
+
"src"
+
File
.
separator
+
"main"
+
File
.
separator
+
"resources"
;
private
String
mqttHome
=
MQServer
.
class
.
getClassLoader
().
getResource
(
""
).
getPath
();
private
String
logLevel
=
"INFO"
;
protected
static
final
String
PRE
=
"mqtt.broker."
;
...
...
@@ -67,8 +67,8 @@ public class BrokerConfig {
*/
//是否启用kafka消息转发
private
boolean
kafkaBrokerEnabled
=
true
;
//kafka地址 127.0.0.1:9092,127.0.0.1:9093
private
String
kafkaServerAddr
=
"1
27.0.0.
1:9092"
;
//kafka地址 127.0.0.1:9092,127.0.0.1:9093
,192.168.0.251:9092
private
String
kafkaServerAddr
=
"1
92.168.0.25
1:9092"
;
//acks回令 如果必须等待回令,那么设置acks为all,否则,设置为-1,等待回令会有性能损耗
private
String
kafkaAcks
=
"-1"
;
//重试次数
...
...
This diff is collapsed.
Click to expand it.
iot-broker/pom.xml
View file @
febb2c69
...
...
@@ -11,7 +11,7 @@
<modules>
<module>
mqtt-broker
</module>
</modules>
<version>
0.0.1
</version>
<version>
0.0.1
-SNAPSHOT
</version>
<name>
mqtt
</name>
<description>
java mqtt broker
</description>
...
...
@@ -30,7 +30,6 @@
<druid.version>
1.2.4
</druid.version>
<jdbc.version>
8.0.16
</jdbc.version>
<log4j2.version>
2.13.3
</log4j2.version>
<junit.version>
5.7.0
</junit.version>
<paho.version>
1.2.5
</paho.version>
<fastjson.version>
1.2.62
</fastjson.version>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment