@@ -237,6 +237,17 @@ public void testAltExchConfiguration()
237
237
createAltExchConfigTest ("configure-and-read-me" ));
238
238
}
239
239
240
+ public void testDLXConfiguration ()
241
+ throws IOException
242
+ {
243
+ runTest (false , false , false , false ,
244
+ createDLXConfigTest ("configure-me" ));
245
+ runTest (false , false , false , false ,
246
+ createDLXConfigTest ("configure-and-write-me" ));
247
+ runTest (false , true , false , false ,
248
+ createDLXConfigTest ("configure-and-read-me" ));
249
+ }
250
+
240
251
public void testNoAccess ()
241
252
throws IOException , InterruptedException
242
253
{
@@ -319,6 +330,18 @@ public void with(String ae) throws IOException {
319
330
}};
320
331
}
321
332
333
+ protected WithName createDLXConfigTest (final String queue )
334
+ throws IOException
335
+ {
336
+ return new WithName () {
337
+ public void with (String dlx ) throws IOException {
338
+ Map <String , Object > args = new HashMap <String , Object >();
339
+ args .put ("x-dead-letter-exchange" , dlx );
340
+ channel .queueDeclare (queue , false , false , false , args );
341
+ channel .queueDelete (queue );
342
+ }};
343
+ }
344
+
322
345
protected void runConfigureTest (WithName test )
323
346
throws IOException
324
347
{
0 commit comments