title: Control Masstransit Exchanges and Bindings
body: <p>I am using Masstransit. I would like to avoid to create an exchange for the endpoint and would rather have the endpoint queue to bind directly to the publishing exchange.</p>
  <p>This is my code</p>
  <pre><code>    cfg.Message&lt;Notification&gt;(x =&gt; { x.SetEntityName(&quot;NOTIFICATION_REQUEST&quot;); });
  
      g.ReceiveEndpoint(&quot;notification-workerQ&quot;, e =&gt;        
      {
           e.Consumer&lt;NotificationConsumer&gt;();
      });
  </code></pre>
  <p>This creates</p>
  <ul>
  <li>NOTIFICATION_REQUEST  exchange</li>
  <li>notification-workerQ exchange</li>
  <li>notification-workerQ queue</li>
  </ul>
  <p>Is there a way to avoid notification-workerQ exchange and have the queue directly bound to NOTIFICATION_REQUEST exchange?</p>
  <p><strong>Additional question</strong></p>
  <p>I am asked to not create an exchange at all but use an already existing topic exchange that I bind my queue to using routing keys.</p>
  <p>That means my notification-workerQ should bind to GENERIC_DROP exchange using a routingkey like &quot;componentX.something.notification&quot;</p>
  <p>Maybe something like</p>
  <pre><code>    g.ReceiveEndpoint(&quot;notification-workerQ&quot;, e =&gt;        
      {
           e.Consumer&lt;NotificationConsumer&gt;(x =&gt; 
           { 
              //THIS IS NOT WORKING CODE
              x.consumeFrom(&quot;GENERIC_DROP&quot;, &quot;ROUTING_KEY&quot;) 
           });
      });
  </code></pre>