Hmm not sure I understand the question? You want to add an ESB (Enterprise Service Bus) between your website and an external system?
I'm not sure i understand what to ask since this is new to me :) I want to integrate with MDM over Azure Service bus.
Should I just create an InitializationModule that creates a queue client and hooks up to the events? Or is this a bad practice? Maybe the Client should be isolated somehow?
We are integrating with NServiceBus using Handler/Message approach. Your handlers would typically run as windows services.
You can configure different message queues using MessageEndpointMappings in web.config.
You could use an InitializationModule for starting the Bus, and then send a message to the queue like this:
ISendOnlyBus bus = ServiceLocator.Current.GetInstance<ISendOnlyBus>(); var myMessage = new MyMessage() {Name = "Bob"}; bus.Send(myMessage);
Hm, ok.
One scenario is adding an e-mail address to a market list in MDM (news letter subscription). I think i must store the message id and the e-mail address, because the request may fail if there is no contact with that e-mail address in MDM. I need to handle this response somewhere.
I was thinking about storing the message id and e-mail address in DDS (maybe together with some other meta data).
Should i create a window service that handles the responses from MDM and then reads data from DDS to create a contact to be able to add the e-mail address to the market list?
Some kind of flow of a possible scenario what i want:
EPi -> AddEmailToListMessage { email = someemail } -> MDM
EPi <- AddEmailToListMessageResponse { succeeded = false } <- MDM
EPi -> AddContactMessage { email = someemail } -> MDM
EPi <- AddContactMessageResponse { id = guid } <- MDM
EPi -> AddEmailToListMessage { email = someemail -> MDM
EPi <- AddEmailToListMessageResponse { succeeded = true } <- MDM
What's best practices if i want to integrate with a system over service bus? I guess the service bus client should run isolated in it's own thread or something? And i don't want this thread to be able to crash the site in anyway.