-
Notifications
You must be signed in to change notification settings - Fork 615
/
AmqpHeaders.java
141 lines (96 loc) · 4.51 KB
/
AmqpHeaders.java
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.amqp.support;
import org.springframework.messaging.MessageHeaders;
/**
* Pre-defined names and prefixes to be used for setting and/or retrieving AMQP
* MessageProperties from/to {@link org.springframework.messaging.Message
* Message} Headers.
*
* @author Mark Fisher
* @author Gary Russell
* @since 1.4
*/
public abstract class AmqpHeaders {
/**
* Prefix used for AMQP related headers in order to distinguish from
* user-defined headers and other internal headers (e.g. replyTo).
* @see SimpleAmqpHeaderMapper
*/
public static final String PREFIX = "amqp_";
// Header Name Constants
public static final String APP_ID = PREFIX + "appId";
public static final String CLUSTER_ID = PREFIX + "clusterId";
public static final String CONTENT_ENCODING = PREFIX + "contentEncoding";
public static final String CONTENT_LENGTH = PREFIX + "contentLength";
public static final String CONTENT_TYPE = MessageHeaders.CONTENT_TYPE;
public static final String CONTENT_TYPE_CONVERTER_WINS = PREFIX + "contentTypeConverterWins";
public static final String CORRELATION_ID = PREFIX + "correlationId";
public static final String DELAY = PREFIX + "delay";
public static final String DELIVERY_MODE = PREFIX + "deliveryMode";
public static final String DELIVERY_TAG = PREFIX + "deliveryTag";
public static final String EXPIRATION = PREFIX + "expiration";
public static final String MESSAGE_COUNT = PREFIX + "messageCount";
public static final String MESSAGE_ID = PREFIX + "messageId";
public static final String RECEIVED_DELAY = PREFIX + "receivedDelay";
public static final String RECEIVED_DELIVERY_MODE = PREFIX + "receivedDeliveryMode";
public static final String RECEIVED_EXCHANGE = PREFIX + "receivedExchange";
public static final String RECEIVED_ROUTING_KEY = PREFIX + "receivedRoutingKey";
public static final String RECEIVED_USER_ID = PREFIX + "receivedUserId";
public static final String REDELIVERED = PREFIX + "redelivered";
public static final String REPLY_TO = PREFIX + "replyTo";
public static final String TIMESTAMP = PREFIX + "timestamp";
public static final String TYPE = PREFIX + "type";
public static final String USER_ID = PREFIX + "userId";
public static final String SPRING_REPLY_CORRELATION = PREFIX + "springReplyCorrelation";
public static final String SPRING_REPLY_TO_STACK = PREFIX + "springReplyToStack";
/**
* A CorrelationData instance for publisher confirms (not mapped).
* @since 2.3
*/
public static final String PUBLISH_CONFIRM_CORRELATION = PREFIX + "publishConfirmCorrelation";
public static final String PUBLISH_CONFIRM = PREFIX + "publishConfirm";
public static final String PUBLISH_CONFIRM_NACK_CAUSE = PREFIX + "publishConfirmNackCause";
public static final String RETURN_REPLY_CODE = PREFIX + "returnReplyCode";
public static final String RETURN_REPLY_TEXT = PREFIX + "returnReplyText";
public static final String RETURN_EXCHANGE = PREFIX + "returnExchange";
public static final String RETURN_ROUTING_KEY = PREFIX + "returnRoutingKey";
public static final String CHANNEL = PREFIX + "channel";
/**
* The tag of the listener container consumer that received the message.
*/
public static final String CONSUMER_TAG = PREFIX + "consumerTag";
/**
* The queue from which the listener container consumer received the message.
*/
public static final String CONSUMER_QUEUE = PREFIX + "consumerQueue";
/**
* The received raw message before conversion; this header usually only appears in
* an {@link org.springframework.messaging.support.ErrorMessage}.
* @since 2.0
*/
public static final String RAW_MESSAGE = PREFIX + "raw_message";
/**
* A flag to indicate that the current message is the last from a batch.
* @since 2.2
*/
public static final String LAST_IN_BATCH = PREFIX + "lastInBatch";
/**
* The number of fragments in a batch message.
* @since 2.2
*/
public static final String BATCH_SIZE = PREFIX + "batchSize";
}