@@ -237,6 +237,17 @@ public void testAltExchConfiguration()
237237 createAltExchConfigTest ("configure-and-read-me" ));
238238 }
239239
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+
240251 public void testNoAccess ()
241252 throws IOException , InterruptedException
242253 {
@@ -319,6 +330,18 @@ public void with(String ae) throws IOException {
319330 }};
320331 }
321332
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+
322345 protected void runConfigureTest (WithName test )
323346 throws IOException
324347 {
0 commit comments