public void configureRabbitListeners(RabbitListenerEndpointRegistrar registrar) {
   Queue queue = rabbitAdmin.declareQueue();
   rabbitAdmin.declareBinding(
       new Binding(queue.getName(), Binding.DestinationType.QUEUE, "crudEvents", "#", null));
   SimpleRabbitListenerEndpoint endpoint = new SimpleRabbitListenerEndpoint();
   endpoint.setId("testMessageListener");
   endpoint.setQueueNames(queue.getName());
   endpoint.setMessageListener(testMessageListener(null));
   registrar.registerEndpoint(endpoint);
 }
 @Bean
 public Queue clientQueue(AmqpAdmin amqpAdmin) {
   // We declare the queue as durable since we may need to redeploy the service during the lab
   // session
   Queue queue = new Queue(SERVICE_REGISTRY_CLIENT_QUEUE_NAME, true, false, true);
   amqpAdmin.declareQueue(queue);
   return queue;
 }