xiangpei
2025-04-18 0aa739db8268b442ab74634289ffed00124a976a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
spring:
  redis:
    host: 42.193.1.25
    port: 6379
    database: 10
    password: ycl2018
  datasource:
    username: root
    password: 321$YcYl@1970!
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://42.193.1.25:3306/ai-chat?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=GMT%2B8
  # rabbitmq
  rabbitmq:
    host: localhost
    username: guest
    password: guest
    virtual-host: /study
    port: 5672
    publisher-confirm-type: correlated   # correlated 异步回调,定义ConfirmCallback  simple 同步
    # publisher-returns 和 mandatory 都是开启回退。
    # publisher-returns是在整个生产者和rabbitmq的连接上的消息都会回退;
    # mandatory 是对消息开启回退,更精确。优先级更高
    # 如果项目中仅仅使用的是SpringBoot自动装配的RabbitTemplate(即现在的配置),那么二者配置一个就行了。推荐 mandatory
    publisher-returns: true  # 开启回退(返回无法路由到队列的消息),定义ReturnCallback回调
    template:
      mandatory: true # 定义消息路由失败时的策略。true,则调用ReturnCallback;false:则直接丢弃消息
    listener:
      simple:
        default-requeue-rejected: false  # 关闭默认拒绝消费时的重新入队,我们使用本地重试消费
        # 确认模式:手动,开启了就必须在代码中手动确认,否则消息会一直重复消费。
        # 开启了重试就应该设置为自动确认,因为手动确认需要捕获异常,而重试就是发生异常才会重试
        acknowledge-mode: manual
        retry:
          enabled: true  # 消费时出现异常进行重试消费,注意不能被捕获,否则无法重试
          max-attempts: 3  # 最大重试次数
          initial-interval: 3000  # 初次重试等待间隔
          multiplier: 2 # 重试失败后,下次等待时间增加多少倍。
 
 
rocketmq:
  producer:
    group: TestGroup
    max-message-size: 50000
    send-message-timeout: 3000
    retry-times-when-send-failed: 3
    retry-times-when-send-async-failed: 3
  name-server: 127.0.0.1:9876
 
# 本地上传配置
upload:
  # 文件存储路径
  url: E:/ycl/file
  domain: http://127.0.0.1:${server.port}/files/
 
 
# 知识库配置
ai:
  domain: http://i-1.gpushare.com
  port: 52574