Helius
2021-01-09 530885dff056bb75bea793a84db6ae486124a24a
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package com.matrix.component.rabbitmq;
 
import com.rabbitmq.client.DeliverCallback;
 
/**
 * MQ队列任务类
 */
public class MqTask {
 
 
    /**
     * 交换机
     */
    private String exchange;
 
    /**
     * 队列名称
     */
    private String queue;
 
    /**
     * 路由名称
     */
    private String routingKey;
 
    /**
     * 处理类在spring中的bean名称
     */
    private com.matrix.core.rabbitmq.DeliverCallbackAdapter handerAdapter;
 
    /**
     * 自动确认 默认为true
     */
    private Boolean autoAck=true;
 
 
    public MqTask(String exchange, String queue, String routingKey, DeliverCallback hander) {
        this.exchange = exchange;
        this.queue = queue;
        this.routingKey = routingKey;
        if(hander!=null){
            this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey);
        }
 
    }
    public MqTask(String exchange, String queue, String routingKey, DeliverCallback hander, Boolean autoAck) {
        this.exchange = exchange;
        this.queue = queue;
        this.routingKey = routingKey;
        if(hander!=null){
            this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey);
        }
        this.autoAck=autoAck;
 
    }
 
 
 
 
 
 
    public String getExchange() {
        return exchange;
    }
 
    public Boolean getAutoAck() {
        return autoAck;
    }
 
    public void setAutoAck(Boolean autoAck) {
        this.autoAck = autoAck;
    }
 
    public void setExchange(String exchange) {
        this.exchange = exchange;
    }
 
    public String getQueue() {
        return queue;
    }
 
    public void setQueue(String queue) {
        this.queue = queue;
    }
 
    public String getRoutingKey() {
        return routingKey;
    }
 
    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }
 
    public DeliverCallback getHander() {
        return handerAdapter;
    }
 
    public void setHander(com.matrix.core.rabbitmq.DeliverCallbackAdapter hander) {
        this.handerAdapter = hander;
    }
}