@@ -133,31 +133,35 @@ public void afterPropertiesSet() {
133
133
}
134
134
135
135
@ Override
136
- public void send (String exchange , String routingKey , Message <?> message ) throws MessagingException {
136
+ public void send (@ Nullable String exchange , @ Nullable String routingKey , Message <?> message )
137
+ throws MessagingException {
138
+
137
139
doSend (exchange , routingKey , message );
138
140
}
139
141
140
142
@ Override
141
- public void convertAndSend (String exchange , String routingKey , Object payload ) throws MessagingException {
143
+ public void convertAndSend (@ Nullable String exchange , @ Nullable String routingKey , Object payload )
144
+ throws MessagingException {
145
+
142
146
convertAndSend (exchange , routingKey , payload , (Map <String , Object >) null );
143
147
}
144
148
145
149
@ Override
146
- public void convertAndSend (String exchange , String routingKey , Object payload ,
150
+ public void convertAndSend (@ Nullable String exchange , @ Nullable String routingKey , Object payload ,
147
151
@ Nullable Map <String , Object > headers ) throws MessagingException {
148
152
149
153
convertAndSend (exchange , routingKey , payload , headers , null );
150
154
}
151
155
152
156
@ Override
153
- public void convertAndSend (String exchange , String routingKey , Object payload ,
157
+ public void convertAndSend (@ Nullable String exchange , @ Nullable String routingKey , Object payload ,
154
158
@ Nullable MessagePostProcessor postProcessor ) throws MessagingException {
155
159
156
160
convertAndSend (exchange , routingKey , payload , null , postProcessor );
157
161
}
158
162
159
163
@ Override
160
- public void convertAndSend (String exchange , String routingKey , Object payload ,
164
+ public void convertAndSend (@ Nullable String exchange , @ Nullable String routingKey , Object payload ,
161
165
@ Nullable Map <String , Object > headers , @ Nullable MessagePostProcessor postProcessor )
162
166
throws MessagingException {
163
167
@@ -166,36 +170,36 @@ public void convertAndSend(String exchange, String routingKey, Object payload,
166
170
}
167
171
168
172
@ Override
169
- public @ Nullable Message <?> sendAndReceive (String exchange , String routingKey , Message <?> requestMessage )
170
- throws MessagingException {
173
+ public @ Nullable Message <?> sendAndReceive (@ Nullable String exchange , @ Nullable String routingKey ,
174
+ Message <?> requestMessage ) throws MessagingException {
171
175
172
176
return doSendAndReceive (exchange , routingKey , requestMessage );
173
177
}
174
178
175
179
@ Override
176
- public <T > @ Nullable T convertSendAndReceive (String exchange , String routingKey , Object request ,
180
+ public <T > @ Nullable T convertSendAndReceive (@ Nullable String exchange , @ Nullable String routingKey , Object request ,
177
181
Class <T > targetClass ) throws MessagingException {
178
182
179
183
return convertSendAndReceive (exchange , routingKey , request , null , targetClass );
180
184
}
181
185
182
186
@ Override
183
- public <T > @ Nullable T convertSendAndReceive (String exchange , String routingKey , Object request ,
187
+ public <T > @ Nullable T convertSendAndReceive (@ Nullable String exchange , @ Nullable String routingKey , Object request ,
184
188
@ Nullable Map <String , Object > headers , Class <T > targetClass ) throws MessagingException {
185
189
186
190
return convertSendAndReceive (exchange , routingKey , request , headers , targetClass , null );
187
191
}
188
192
189
193
@ Override
190
- public <T > @ Nullable T convertSendAndReceive (String exchange , String routingKey , Object request ,
194
+ public <T > @ Nullable T convertSendAndReceive (@ Nullable String exchange , @ Nullable String routingKey , Object request ,
191
195
Class <T > targetClass , @ Nullable MessagePostProcessor requestPostProcessor ) throws MessagingException {
192
196
193
197
return convertSendAndReceive (exchange , routingKey , request , null , targetClass , requestPostProcessor );
194
198
}
195
199
196
200
@ SuppressWarnings ("unchecked" )
197
201
@ Override
198
- public <T > @ Nullable T convertSendAndReceive (String exchange , String routingKey , Object request ,
202
+ public <T > @ Nullable T convertSendAndReceive (@ Nullable String exchange , @ Nullable String routingKey , Object request ,
199
203
@ Nullable Map <String , Object > headers ,
200
204
Class <T > targetClass , @ Nullable MessagePostProcessor requestPostProcessor ) throws MessagingException {
201
205
@@ -205,7 +209,7 @@ public void convertAndSend(String exchange, String routingKey, Object payload,
205
209
}
206
210
207
211
@ Override
208
- protected void doSend (String destination , Message <?> message ) {
212
+ protected void doSend (@ Nullable String destination , Message <?> message ) {
209
213
try {
210
214
Object correlation = message .getHeaders ().get (AmqpHeaders .PUBLISH_CONFIRM_CORRELATION );
211
215
if (correlation instanceof CorrelationData corrData ) {
@@ -220,7 +224,7 @@ protected void doSend(String destination, Message<?> message) {
220
224
}
221
225
}
222
226
223
- protected void doSend (String exchange , String routingKey , Message <?> message ) {
227
+ protected void doSend (@ Nullable String exchange , @ Nullable String routingKey , Message <?> message ) {
224
228
try {
225
229
Object correlation = message .getHeaders ().get (AmqpHeaders .PUBLISH_CONFIRM_CORRELATION );
226
230
if (correlation instanceof CorrelationData corrData ) {
@@ -268,7 +272,7 @@ private String resolveDestination() {
268
272
}
269
273
270
274
@ Override
271
- protected @ Nullable Message <?> doSendAndReceive (String destination , Message <?> requestMessage ) {
275
+ protected @ Nullable Message <?> doSendAndReceive (@ Nullable String destination , Message <?> requestMessage ) {
272
276
try {
273
277
org .springframework .amqp .core .Message amqpMessage = this .rabbitTemplate .sendAndReceive (
274
278
destination , createMessage (requestMessage ));
@@ -279,7 +283,8 @@ private String resolveDestination() {
279
283
}
280
284
}
281
285
282
- protected @ Nullable Message <?> doSendAndReceive (String exchange , String routingKey , Message <?> requestMessage ) {
286
+ protected @ Nullable Message <?> doSendAndReceive (@ Nullable String exchange , @ Nullable String routingKey ,
287
+ Message <?> requestMessage ) {
283
288
try {
284
289
org .springframework .amqp .core .Message amqpMessage = this .rabbitTemplate .sendAndReceive (
285
290
exchange , routingKey , createMessage (requestMessage ));
0 commit comments