Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
24261ecb
Commit
24261ecb
authored
Jul 05, 2023
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表结构修改
parent
8800de17
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
37 additions
and
0 deletions
+37
-0
CheckerHelper.java
.../main/java/com/yanzuoguang/util/helper/CheckerHelper.java
+1
-0
DateHelper.java
...src/main/java/com/yanzuoguang/util/helper/DateHelper.java
+1
-0
EnumHelper.java
...src/main/java/com/yanzuoguang/util/helper/EnumHelper.java
+3
-0
RunHelper.java
.../src/main/java/com/yanzuoguang/util/helper/RunHelper.java
+1
-0
Log.java
...util-base/src/main/java/com/yanzuoguang/util/log/Log.java
+1
-0
ProcessData.java
...rc/main/java/com/yanzuoguang/util/thread/ProcessData.java
+1
-0
RunPlan.java
...se/src/main/java/com/yanzuoguang/util/thread/RunPlan.java
+2
-0
RunnableListAutoItem.java
...ava/com/yanzuoguang/util/thread/RunnableListAutoItem.java
+1
-0
ThreadHelper.java
...c/main/java/com/yanzuoguang/util/thread/ThreadHelper.java
+2
-0
ThreadNext.java
...src/main/java/com/yanzuoguang/util/thread/ThreadNext.java
+1
-0
HttpHelperTest.java
yzg-util-base/src/test/java/helper/HttpHelperTest.java
+1
-0
YzgFileConsumer.java
...main/java/com/yanzuoguang/cloud/file/YzgFileConsumer.java
+12
-0
MqConfigurable.java
...src/main/java/com/yanzuoguang/mq/base/MqConfigurable.java
+2
-0
YzgMqConsumer.java
.../src/main/java/com/yanzuoguang/mq/plan/YzgMqConsumer.java
+6
-0
MessageSendServiceImpl.java
...m/yanzuoguang/mq/service/impl/MessageSendServiceImpl.java
+1
-0
MessageServeServiceImpl.java
.../yanzuoguang/mq/service/impl/MessageServeServiceImpl.java
+1
-0
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/CheckerHelper.java
View file @
24261ecb
...
@@ -385,6 +385,7 @@ public final class CheckerHelper {
...
@@ -385,6 +385,7 @@ public final class CheckerHelper {
DateAutoHelper
.
getAutoDate
(
paramVal
);
DateAutoHelper
.
getAutoDate
(
paramVal
);
}
}
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
this
.
checkResult
=
language
.
format
(
PARAM_NOT_DATE
,
paramName
,
formatStr
);
this
.
checkResult
=
language
.
format
(
PARAM_NOT_DATE
,
paramName
,
formatStr
);
this
.
setValid
(
false
);
this
.
setValid
(
false
);
}
}
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/DateHelper.java
View file @
24261ecb
...
@@ -99,6 +99,7 @@ public class DateHelper {
...
@@ -99,6 +99,7 @@ public class DateHelper {
}
}
return
initMillSecond
(
to
,
initMillSecond
);
return
initMillSecond
(
to
,
initMillSecond
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
DateHelper
.
class
,
ex
,
from
);
ExceptionHelper
.
handleException
(
DateHelper
.
class
,
ex
,
from
);
}
}
return
null
;
return
null
;
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/EnumHelper.java
View file @
24261ecb
...
@@ -22,6 +22,7 @@ public class EnumHelper {
...
@@ -22,6 +22,7 @@ public class EnumHelper {
result
=
Enum
.
valueOf
(
vType
,
vStr
);
result
=
Enum
.
valueOf
(
vType
,
vStr
);
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
EnumHelper
.
class
,
ex
,
vStr
);
ExceptionHelper
.
handleException
(
EnumHelper
.
class
,
ex
,
vStr
);
}
}
return
result
;
return
result
;
...
@@ -40,6 +41,7 @@ public class EnumHelper {
...
@@ -40,6 +41,7 @@ public class EnumHelper {
result
=
(
T
)
Enum
.
valueOf
((
Class
)
vType
,
vStr
);
result
=
(
T
)
Enum
.
valueOf
((
Class
)
vType
,
vStr
);
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
EnumHelper
.
class
,
ex
,
vStr
);
ExceptionHelper
.
handleException
(
EnumHelper
.
class
,
ex
,
vStr
);
}
}
if
(
result
==
null
&&
vDefault
==
null
)
{
if
(
result
==
null
&&
vDefault
==
null
)
{
...
@@ -69,6 +71,7 @@ public class EnumHelper {
...
@@ -69,6 +71,7 @@ public class EnumHelper {
}
}
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
EnumHelper
.
class
,
ex
,
i
);
ExceptionHelper
.
handleException
(
EnumHelper
.
class
,
ex
,
i
);
}
}
return
result
;
return
result
;
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/RunHelper.java
View file @
24261ecb
...
@@ -43,6 +43,7 @@ public class RunHelper {
...
@@ -43,6 +43,7 @@ public class RunHelper {
ex
=
null
;
ex
=
null
;
break
;
break
;
}
catch
(
RuntimeException
e
)
{
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
if
(
i
<
size
)
{
if
(
i
<
size
)
{
// 间隔100ms,防止服务器重启时请求失败
// 间隔100ms,防止服务器重启时请求失败
ThreadHelper
.
sleep
(
sleep
);
ThreadHelper
.
sleep
(
sleep
);
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/log/Log.java
View file @
24261ecb
...
@@ -165,6 +165,7 @@ public class Log {
...
@@ -165,6 +165,7 @@ public class Log {
try
{
try
{
msg
=
String
.
format
(
msg
,
args
);
msg
=
String
.
format
(
msg
,
args
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
Log
.
class
,
ex
);
Log
.
error
(
Log
.
class
,
ex
);
}
}
}
}
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/ProcessData.java
View file @
24261ecb
...
@@ -75,6 +75,7 @@ public class ProcessData {
...
@@ -75,6 +75,7 @@ public class ProcessData {
try
{
try
{
runProcess
.
execute
(
this
);
runProcess
.
execute
(
this
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
HttpHelper
.
class
,
ex
);
Log
.
error
(
HttpHelper
.
class
,
ex
);
}
}
}
}
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/RunPlan.java
View file @
24261ecb
...
@@ -102,6 +102,7 @@ public class RunPlan {
...
@@ -102,6 +102,7 @@ public class RunPlan {
}
}
millSeconds
=
(
now
-
item
.
getDate
());
millSeconds
=
(
now
-
item
.
getDate
());
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
ThreadHelper
.
class
,
ex
);
ExceptionHelper
.
handleException
(
ThreadHelper
.
class
,
ex
);
}
}
// 未到执行时间
// 未到执行时间
...
@@ -117,6 +118,7 @@ public class RunPlan {
...
@@ -117,6 +118,7 @@ public class RunPlan {
this
.
triggerEvent
(
this
.
onItemExecuted
);
this
.
triggerEvent
(
this
.
onItemExecuted
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
RunPlan
.
class
,
ex
);
ExceptionHelper
.
handleException
(
RunPlan
.
class
,
ex
);
}
}
item
.
initDate
();
item
.
initDate
();
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/RunnableListAutoItem.java
View file @
24261ecb
...
@@ -142,6 +142,7 @@ public class RunnableListAutoItem implements Comparable<RunnableListAutoItem> {
...
@@ -142,6 +142,7 @@ public class RunnableListAutoItem implements Comparable<RunnableListAutoItem> {
}
}
this
.
code
.
run
();
this
.
code
.
run
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
this
.
handleException
(
ex
);
this
.
handleException
(
ex
);
}
finally
{
}
finally
{
this
.
count
++;
this
.
count
++;
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/ThreadHelper.java
View file @
24261ecb
...
@@ -75,11 +75,13 @@ public class ThreadHelper {
...
@@ -75,11 +75,13 @@ public class ThreadHelper {
try
{
try
{
timeout
.
run
(
true
,
-
1
);
timeout
.
run
(
true
,
-
1
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
ThreadHelper
.
class
,
ex
);
ExceptionHelper
.
handleException
(
ThreadHelper
.
class
,
ex
);
}
}
try
{
try
{
interval
.
run
(
false
,
-
1
);
interval
.
run
(
false
,
-
1
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ExceptionHelper
.
handleException
(
ThreadHelper
.
class
,
ex
);
ExceptionHelper
.
handleException
(
ThreadHelper
.
class
,
ex
);
}
}
if
(
timeout
.
getCount
()
==
0
&&
interval
.
getCount
()
==
0
)
{
if
(
timeout
.
getCount
()
==
0
&&
interval
.
getCount
()
==
0
)
{
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/ThreadNext.java
View file @
24261ecb
...
@@ -61,6 +61,7 @@ public class ThreadNext {
...
@@ -61,6 +61,7 @@ public class ThreadNext {
try
{
try
{
isPause
=
next
.
next
();
isPause
=
next
.
next
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
boolean
isNewEx
=
frontEx
==
null
||
!(
frontEx
.
getClass
()
==
ex
.
getClass
()
&&
boolean
isNewEx
=
frontEx
==
null
||
!(
frontEx
.
getClass
()
==
ex
.
getClass
()
&&
StringHelper
.
compare
(
frontEx
.
getMessage
(),
ex
.
getMessage
()));
StringHelper
.
compare
(
frontEx
.
getMessage
(),
ex
.
getMessage
()));
if
(
isNewEx
||
System
.
currentTimeMillis
()
-
newErrorTime
>
5L
*
60L
*
1000L
)
{
if
(
isNewEx
||
System
.
currentTimeMillis
()
-
newErrorTime
>
5L
*
60L
*
1000L
)
{
...
...
yzg-util-base/src/test/java/helper/HttpHelperTest.java
View file @
24261ecb
...
@@ -120,6 +120,7 @@ public class HttpHelperTest {
...
@@ -120,6 +120,7 @@ public class HttpHelperTest {
try
{
try
{
String
s
=
HttpHelper
.
get
(
req
.
url
);
String
s
=
HttpHelper
.
get
(
req
.
url
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
isError
=
true
;
isError
=
true
;
}
finally
{
}
finally
{
long
end
=
System
.
currentTimeMillis
();
long
end
=
System
.
currentTimeMillis
();
...
...
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/YzgFileConsumer.java
View file @
24261ecb
...
@@ -66,8 +66,10 @@ public class YzgFileConsumer implements InitializingBean {
...
@@ -66,8 +66,10 @@ public class YzgFileConsumer implements InitializingBean {
try
{
try
{
fileService
.
removeTempFolder
(
tempFolder
);
fileService
.
removeTempFolder
(
tempFolder
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
fileProcedure
.
removeTempFolder
(
tempFolder
);
fileProcedure
.
removeTempFolder
(
tempFolder
);
}
finally
{
}
finally
{
...
@@ -88,8 +90,10 @@ public class YzgFileConsumer implements InitializingBean {
...
@@ -88,8 +90,10 @@ public class YzgFileConsumer implements InitializingBean {
YzgFileMoveReqVo
req
=
JsonHelper
.
deserialize
(
json
,
YzgFileMoveReqVo
.
class
);
YzgFileMoveReqVo
req
=
JsonHelper
.
deserialize
(
json
,
YzgFileMoveReqVo
.
class
);
fileService
.
moveFile
(
req
);
fileService
.
moveFile
(
req
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
fileProcedure
.
moveFile
(
json
,
60
*
1000
);
fileProcedure
.
moveFile
(
json
,
60
*
1000
);
}
finally
{
}
finally
{
...
@@ -125,8 +129,10 @@ public class YzgFileConsumer implements InitializingBean {
...
@@ -125,8 +129,10 @@ public class YzgFileConsumer implements InitializingBean {
fileProcedure
.
convertImage
(
req
);
fileProcedure
.
convertImage
(
req
);
}
}
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
fileProcedure
.
convertImage
(
json
,
60
*
1000
);
fileProcedure
.
convertImage
(
json
,
60
*
1000
);
}
finally
{
}
finally
{
...
@@ -162,8 +168,10 @@ public class YzgFileConsumer implements InitializingBean {
...
@@ -162,8 +168,10 @@ public class YzgFileConsumer implements InitializingBean {
fileProcedure
.
convertVideo
(
req
);
fileProcedure
.
convertVideo
(
req
);
}
}
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
fileProcedure
.
convertVideo
(
json
,
60
*
1000
);
fileProcedure
.
convertVideo
(
json
,
60
*
1000
);
}
finally
{
}
finally
{
...
@@ -188,8 +196,10 @@ public class YzgFileConsumer implements InitializingBean {
...
@@ -188,8 +196,10 @@ public class YzgFileConsumer implements InitializingBean {
}
}
excelService
.
fileCreate
(
json
,
fileReq
);
excelService
.
fileCreate
(
json
,
fileReq
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
fileProcedure
.
fileCreateDelay
(
json
);
fileProcedure
.
fileCreateDelay
(
json
);
}
finally
{
}
finally
{
...
@@ -213,8 +223,10 @@ public class YzgFileConsumer implements InitializingBean {
...
@@ -213,8 +223,10 @@ public class YzgFileConsumer implements InitializingBean {
}
}
excelService
.
updateStatus
(
fileReq
);
excelService
.
updateStatus
(
fileReq
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
Log
.
error
(
YzgFileConsumer
.
class
,
ex
);
fileProcedure
.
fileStatus
(
json
);
fileProcedure
.
fileStatus
(
json
);
}
finally
{
}
finally
{
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/base/MqConfigurable.java
View file @
24261ecb
...
@@ -68,6 +68,7 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
...
@@ -68,6 +68,7 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
System
.
out
.
println
(
"丢失消息:"
+
ack
+
" msg:"
+
cause
);
System
.
out
.
println
(
"丢失消息:"
+
ack
+
" msg:"
+
cause
);
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
MqConfigurable
.
class
,
ex
);
Log
.
error
(
MqConfigurable
.
class
,
ex
);
}
}
}
}
...
@@ -93,6 +94,7 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
...
@@ -93,6 +94,7 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
// 写入数据库
// 写入数据库
messageSendService
.
onError
(
messageVo
);
messageSendService
.
onError
(
messageVo
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
MqConfigurable
.
class
,
ex
);
Log
.
error
(
MqConfigurable
.
class
,
ex
);
}
}
}
}
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/plan/YzgMqConsumer.java
View file @
24261ecb
...
@@ -49,8 +49,10 @@ public class YzgMqConsumer {
...
@@ -49,8 +49,10 @@ public class YzgMqConsumer {
req
=
JsonHelper
.
deserialize
(
json
,
MessageVo
.
class
);
req
=
JsonHelper
.
deserialize
(
json
,
MessageVo
.
class
);
yzgMqProcedure
.
send
(
req
,
true
);
yzgMqProcedure
.
send
(
req
,
true
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
// 等待100ms再次执行
// 等待100ms再次执行
yzgMqProcedure
.
sendDelay
(
req
,
100
);
yzgMqProcedure
.
sendDelay
(
req
,
100
);
...
@@ -74,8 +76,10 @@ public class YzgMqConsumer {
...
@@ -74,8 +76,10 @@ public class YzgMqConsumer {
req
=
JsonHelper
.
deserialize
(
json
,
MessagePlan
.
class
);
req
=
JsonHelper
.
deserialize
(
json
,
MessagePlan
.
class
);
yzgMqProcedure
.
sendDelay
(
req
);
yzgMqProcedure
.
sendDelay
(
req
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
// 等待100ms再次执行
// 等待100ms再次执行
yzgMqProcedure
.
sendDelay
(
req
,
100
);
yzgMqProcedure
.
sendDelay
(
req
,
100
);
...
@@ -97,8 +101,10 @@ public class YzgMqConsumer {
...
@@ -97,8 +101,10 @@ public class YzgMqConsumer {
RegisterServerTokenReqVo
req
=
JsonHelper
.
deserialize
(
json
,
RegisterServerTokenReqVo
.
class
);
RegisterServerTokenReqVo
req
=
JsonHelper
.
deserialize
(
json
,
RegisterServerTokenReqVo
.
class
);
messageServerService
.
removeServerToken
(
req
);
messageServerService
.
removeServerToken
(
req
);
}
catch
(
CodeException
ex
)
{
}
catch
(
CodeException
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
Log
.
error
(
YzgMqConsumer
.
class
,
ex
);
// 等待100ms再次执行
// 等待100ms再次执行
yzgMqProcedure
.
sendRemove
(
json
,
100
);
yzgMqProcedure
.
sendRemove
(
json
,
100
);
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/impl/MessageSendServiceImpl.java
View file @
24261ecb
...
@@ -149,6 +149,7 @@ public class MessageSendServiceImpl implements MessageSendService {
...
@@ -149,6 +149,7 @@ public class MessageSendServiceImpl implements MessageSendService {
channel
.
basicAck
(
message
.
getMessageProperties
().
getDeliveryTag
(),
false
);
channel
.
basicAck
(
message
.
getMessageProperties
().
getDeliveryTag
(),
false
);
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
Log
.
error
(
MessageSendServiceImpl
.
class
,
e
);
Log
.
error
(
MessageSendServiceImpl
.
class
,
e
);
}
}
}
}
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/impl/MessageServeServiceImpl.java
View file @
24261ecb
...
@@ -192,6 +192,7 @@ public class MessageServeServiceImpl implements MessageServerService, Initializi
...
@@ -192,6 +192,7 @@ public class MessageServeServiceImpl implements MessageServerService, Initializi
});
});
sendServerMessage
(
msg
);
sendServerMessage
(
msg
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
Log
.
error
(
MqServiceImpl
.
class
,
ex
);
Log
.
error
(
MqServiceImpl
.
class
,
ex
);
}
finally
{
}
finally
{
messageSendService
.
basicAck
(
message
,
channel
);
messageSendService
.
basicAck
(
message
,
channel
);
...
...
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