title: Programatically bridge a QueueChannel to a MessageChannel in Spring
body: <p>I'm attempting to wire a queue to the front of a <code>MessageChannel</code>, and I need to do so programatically so it can be done at run time in response to an <code>osgi:listener</code> being triggered.  So far I've got:</p>
  
  <pre><code>public void addService(MessageChannel mc, Map&lt;String,Object&gt; properties)
  {
      //Create the queue and the QueueChannel
      BlockingQueue&lt;Message&lt;?&gt;&gt; q = new LinkedBlockingQueue&lt;Message&lt;?&gt;&gt;();
      QueueChannel qc = new QueueChannel(q);
  
      //Create the Bridge and set the output to the input parameter channel
      BridgeHandler b = new BridgeHandler();
      b.setOutputChannel(mc);
  
      //Presumably, I need something here to poll the QueueChannel
      //and drop it onto the bridge.  This is where I get lost
  
  }
  </code></pre>
  
  <p>Looking through the various relevant classes, I came up with:</p>
  
  <pre><code>    PollerMetadata pm = new PollerMetadata();
      pm.setTrigger(new IntervalTrigger(10));
  
      PollingConsumer pc = new PollingConsumer(qc, b);
  </code></pre>
  
  <p>but I'm not able to put it all together.  What am I missing?</p>