Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
marketing
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
dingjy
marketing
Commits
acb16012
Commit
acb16012
authored
Mar 14, 2024
by
宋新宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
858e68c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
NovelActiveConsumer.java
...ava/com/lwby/marketing/att/novel/NovelActiveConsumer.java
+19
-19
application-prod.yml
src/main/resources/application-prod.yml
+2
-2
No files found.
src/main/java/com/lwby/marketing/att/novel/NovelActiveConsumer.java
View file @
acb16012
...
...
@@ -37,25 +37,25 @@ public class NovelActiveConsumer implements MessageListener<String, String> {
@Override
public
void
onMessage
(
ConsumerRecord
<
String
,
String
>
data
)
{
long
begin
=
System
.
currentTimeMillis
();
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"media.active.onMessage start, data={}"
,
data
==
null
?
null
:
data
.
value
());
}
if
(
data
!=
null
)
{
try
{
BookStoreEvent
event
=
JSON
.
parseObject
(
data
.
value
(),
BookStoreEvent
.
class
);
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"media.active.topic={}, bookStoreEvent={}"
,
data
.
topic
(),
JSON
.
toJSONString
(
event
));
}
NovelAction
action
=
new
NovelAction
(
event
.
getClientInfo
(),
data
.
value
());
executorNovel
.
execute
(
action
);
}
catch
(
Throwable
e
)
{
log
.
error
(
"novel.active.onMessage failed, data={}, costTime={} ms"
,
data
.
value
(),
System
.
currentTimeMillis
()
-
begin
,
e
);
}
}
//
long begin = System.currentTimeMillis();
//
if (log.isInfoEnabled()) {
//
log.info("media.active.onMessage start, data={}", data == null ? null : data.value());
//
}
//
if (data != null) {
//
try {
//
BookStoreEvent event = JSON.parseObject(data.value(), BookStoreEvent.class);
//
if (log.isInfoEnabled()) {
//
log.info("media.active.topic={}, bookStoreEvent={}", data.topic(), JSON.toJSONString(event));
//
}
//
//
NovelAction action = new NovelAction(event.getClientInfo(), data.value());
//
//
executorNovel.execute(action);
//
} catch (Throwable e) {
//
log.error("novel.active.onMessage failed, data={}, costTime={} ms", data.value(),
//
System.currentTimeMillis() - begin, e);
//
}
//
}
}
}
\ No newline at end of file
src/main/resources/application-prod.yml
View file @
acb16012
...
...
@@ -15,7 +15,7 @@ spring:
initialSize
:
1
minIdle
:
1
redis
:
host
:
r-2ze
mv0esbjz5tsnmxn.redis
.rds.aliyuncs.com
host
:
r-2ze
knwihqn2v6q4x5x.tairpdb
.rds.aliyuncs.com
port
:
6379
kafka
:
bootstrap-servers
:
172.17.243.58:9092,172.17.243.59:9092,172.17.243.60:9092,172.17.243.61:9092,172.17.243.62:9092
...
...
@@ -51,7 +51,7 @@ system:
novel
:
active
:
topic
:
novelActive
group_id
:
novel_dy_active
group_id
:
novel_dy_active
_1
management
:
health
:
...
...
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