title: Rebus - Subscribing to Events in ASP.NET Core
body: <p>I have two applications using Rebus in ASP.NET MVC Core 
  I am able send messages between two applications using Bus.Send(...). What I can't is to publish event such as CustomerCreated after creating so that other applications can take actions.</p>
  
  <p>I have configured the application as follows</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {    
       services.AutoRegisterHandlersFromAssemblyOf&lt;Handler1&gt;();
       services.AddRebus(configure =&gt; configure
              .Logging(l =&gt; l.Use(new MSLoggerFactoryAdapter(_loggerFactory)))
              .Transport(t=&gt;t.UseRabbitMq("amqp://guest:guest@localhost:5672", "rebus_rabbit_first"))
                      .Sagas(x =&gt; x.StoreInSqlServer("Data Source=.;Initial Catalog=RebusDBRabbit;User ID=student;Password=student;", "Sagas", "SagaIndex"))
                      .Options(o =&gt;
                      {
                          o.SetNumberOfWorkers(10);
                          o.SetMaxParallelism(20);
                          o.HandleMessagesInsideTransactionScope();
                          o.SimpleRetryStrategy(errorQueueAddress: "somewhere_else", maxDeliveryAttempts: 10, secondLevelRetriesEnabled: true);
  
                       })
  
                      .Routing(r =&gt; r.TypeBased()
                      .MapAssemblyOf&lt;CreateStudent&gt;("rebus_rabbit_second")));
  
  
              services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
          }
  </code></pre>
  
  <p>In the Controller I Send a message to another Application as follows</p>
  
  <pre><code>CreateStudent student = new CreateStudent { StudentID="90008", StudentName="Amour Rashid Hamad",DateOfBirth=DateTime.Parse("1974-03-18") };
  _bus.Send(student).Wait();
  </code></pre>
  
  <p>This is OK.
  Now My Problem is to publish an event to broadcast the event to other interested parties eg</p>
  
  <pre><code> _bus.Publish(new StudentCreated { StudentID="90008",Remarks="Hurray We have been Successfully"});
  </code></pre>
  
  <p>How Do I Subscribe to the event as per my configuration. I have seen some samples but I could not understand them. Adding to my implementation would be preferred.</p>