mirror of
https://gitee.com/shikong-sk/springcloud-study
synced 2024-11-09 01:51:19 +08:00
调整
This commit is contained in:
parent
d7da5c5078
commit
3e4f967a51
6
.idea/jpa-buddy.xml
Normal file
6
.idea/jpa-buddy.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JpaBuddyIdeaProjectConfig">
|
||||
<option name="renamerInitialized" value="true" />
|
||||
</component>
|
||||
</project>
|
@ -12,4 +12,7 @@
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="jpab" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/kafka-01/kafka-01-producer/src/test/python/python.iml" filepath="$PROJECT_DIR$/kafka-01/kafka-01-producer/src/test/python/python.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +1,8 @@
|
||||
|
||||
spring:
|
||||
kafka:
|
||||
bootstrap-servers: 10.10.10.200:9092
|
||||
#bootstrap-servers: 10.10.10.200:9192,10.10.10.200:9292,10.10.10.200:9392
|
||||
# bootstrap-servers: 10.10.10.200:9092
|
||||
bootstrap-servers: 10.10.10.200:9192,10.10.10.200:9292,10.10.10.200:9392
|
||||
|
||||
consumer:
|
||||
# 自动提交的时间间隔 在spring boot 2.X 版本是值的类型为Duration 需要符合特定的格式,如1S,1M,2H,5D
|
||||
|
@ -1,7 +1,7 @@
|
||||
spring:
|
||||
kafka:
|
||||
bootstrap-servers: 10.10.10.200:9092
|
||||
# bootstrap-servers: 10.10.10.200:9192,10.10.10.200:9292,10.10.10.200:9392
|
||||
# bootstrap-servers: 10.10.10.200:9092
|
||||
bootstrap-servers: 10.10.10.200:9192,10.10.10.200:9292,10.10.10.200:9392
|
||||
|
||||
producer:
|
||||
retries: 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
spring:
|
||||
kafka:
|
||||
bootstrap-servers: 10.10.10.200:9092
|
||||
# bootstrap-servers: 10.10.10.200:9192,10.10.10.200:9292,10.10.10.200:9392
|
||||
# bootstrap-servers: 10.10.10.200:9092
|
||||
bootstrap-servers: 10.10.10.200:9192,10.10.10.200:9292,10.10.10.200:9392
|
||||
|
||||
producer:
|
||||
retries: 1
|
||||
|
21
kafka-01/kafka-01-producer/src/test/python/productor.py
Normal file
21
kafka-01/kafka-01-producer/src/test/python/productor.py
Normal file
@ -0,0 +1,21 @@
|
||||
import os
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
import requests
|
||||
|
||||
server = "http://127.0.0.1:8081/api/v2/"
|
||||
|
||||
workers = os.cpu_count()
|
||||
|
||||
max_message = 100000
|
||||
|
||||
|
||||
def send(num: int):
|
||||
print("发送第 %s 条消息" % num)
|
||||
requests.get(server + str(num))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with ThreadPoolExecutor(max_workers=workers) as worker:
|
||||
for i in range(max_message):
|
||||
worker.submit(send, i)
|
9
kafka-01/kafka-01-producer/src/test/python/python.iml
Normal file
9
kafka-01/kafka-01-producer/src/test/python/python.iml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in New Issue
Block a user