I've run into some problems regarding rebus.
Here is my scenario. We have three services
Identity) published 'IdentityCreated' Message
Gateway) sends 'UpdateProfileCommand' directly into 'profile-westeu-input' queue
Profile) Consumes messages from input queue 'profile-westeu-input' and subscribes to 'IdentityCreated' messages
The rebus configuration seen in Profile Service
Given that i have registered my handlers with castle windsor.
container.Register(Classes.FromThisAssembly()
.BasedOn(typeof(IHandleMessages<>))
.WithServiceAllInterfaces()
.LifestyleTransient());
And i configured Rebus with
var bus = Configure.With(new CastleWindsorContainerAdapter(container))
.Logging(x => x.Trace())
.Transport(
t => t.UseAzureServiceBus(connectionStringNameOrConnectionString: connectionString,
inputQueueAddress: ProfileInputQueueName, mode: AzureServiceBusMode.Standard))
.Options(o => o.SimpleRetryStrategy(ProfileErrorQueueName))
.Start();
and subscribed to a message type like this
bus.Subscribe(typeof(Nabufit.Messages.Identity.Events.IdentityCreated)).Wait()
I expected my handler was being called automatically. However it doesnt :(.
I've tried different solutions
- Changed name of input queues
- Created an eventemitter program, which published an event of the type 'IdentityCreated'. When looking in the input queue it is present but it doesnt get picked up by rebus.
Bonus info:
- Using azure service bus
- Hosting Rebus inside a Service fabric application
- My input queue is named 'profile-westeu-input'