title: Spring Message Listener Names
body: <p>I have created several spring 4.1.6 @JmsListener methods for receiving messages from queues.  I would like to get the list of listener names for admin purpose:</p>
  
  <pre><code>    @JmsListener(
          destination = "${jms.destination.name}"
          , containerFactory = "myJmsContainerFactory"
          , id ="myListener")
      public void receiveMessage(String message) {
          System.out.println("Received &lt;" + message + "&gt;");
      }
  </code></pre>
  
  <p>and I want to display the id/name of the listeners for admin purposes.  I can stop and start the listeners with the JmsListenerEndpointRegistry, but can't see how to get the name of the specific listeners.  </p>
  
  <pre><code>    JmsListenerEndpointRegistry registry = context.getBean(org.springframework.jms.config.JmsListenerEndpointRegistry.class);
  
      Collection&lt;MessageListenerContainer&gt; listeners = registry.getListenerContainers();
      MessageListenerContainer mlc = registry.getListenerContainer("myListener");
      System.out.println("Running" + mlc.isRunning());
  
      mlc.stop();
  </code></pre>
  
  <p>In debug the Collection can be seen as a Collections$UnmodifiableCollection with a LinkedHashMap that has the listener id ,myListener in this case, as the key value of the LinkedHashMap</p>