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
60
61
62
package com.yanzuoguang.mq;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* MQ配置
*
* @author 颜佐光
*/
@Component
public class MqConfig {
@Value("${spring.rabbitmq.listener.simple.concurrency:1}")
private int concurrency;
@Value("${spring.rabbitmq.listener.simple.max-concurrency:10}")
private int maxConcurrency;
@Value("${spring.rabbitmq.listener.simple.prefetch:100}")
private int prefetch;
@Value("${spring.rabbitmq.listener.simple.transaction-size:100}")
private int txSize;
@Value("${yzg.mq.retry.size:100}")
private int retrySize = 100;
@Value("${yzg.mq.retry.time:60000}")
private int retryTime = 1000;
@Value("${yzg.mq.unit.min:1000}")
private long unitMin;
public int getConcurrency() {
return concurrency;
}
public int getMaxConcurrency() {
return maxConcurrency;
}
public int getPrefetch() {
return prefetch;
}
public int getTxSize() {
return txSize;
}
public int getRetrySize() {
return retrySize;
}
public int getRetryTime() {
return retryTime;
}
public long getUnitMin() {
return unitMin;
}
}