Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
springboot-demo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
Leona
W
web
backend
springboot-demo
Commits
63926d58
Commit
63926d58
authored
Oct 22, 2019
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dataStream api
parent
0fc74f13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
kafka/src/main/java/com/duanledexianxianxian/demo/kafka/listener/AppListener.java
...duanledexianxianxian/demo/kafka/listener/AppListener.java
+3
-3
No files found.
kafka/src/main/java/com/duanledexianxianxian/demo/kafka/listener/AppListener.java
View file @
63926d58
...
@@ -46,7 +46,7 @@ public class AppListener implements ApplicationListener<ApplicationReadyEvent> {
...
@@ -46,7 +46,7 @@ public class AppListener implements ApplicationListener<ApplicationReadyEvent> {
});
});
try
{
try
{
Thread
.
sleep
(
5
000
);
Thread
.
sleep
(
new
Random
().
nextInt
(
6
)
*
1
000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -56,8 +56,8 @@ public class AppListener implements ApplicationListener<ApplicationReadyEvent> {
...
@@ -56,8 +56,8 @@ public class AppListener implements ApplicationListener<ApplicationReadyEvent> {
private
void
sendData
(
int
i
)
{
private
void
sendData
(
int
i
)
{
Student
student
=
new
Student
();
Student
student
=
new
Student
();
student
.
setStudentId
(
"duanledexianxianxian"
+
i
);
student
.
setStudentId
(
String
.
valueOf
(
i
)
);
student
.
setName
(
RandomStringUtils
.
randomAlphabetic
(
1
0
));
student
.
setName
(
"duanledexianxianxian"
+
new
Random
().
nextInt
(
2
0
));
student
.
setAge
(
new
Random
().
nextInt
(
19
)
+
6
);
student
.
setAge
(
new
Random
().
nextInt
(
19
)
+
6
);
student
.
setSex
(
Byte
.
valueOf
(
String
.
valueOf
((
new
Random
().
nextInt
(
2
)))));
student
.
setSex
(
Byte
.
valueOf
(
String
.
valueOf
((
new
Random
().
nextInt
(
2
)))));
log
.
info
(
"Thread:{} Send Data:{}"
,
Thread
.
currentThread
().
getName
(),
student
);
log
.
info
(
"Thread:{} Send Data:{}"
,
Thread
.
currentThread
().
getName
(),
student
);
...
...
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