It appears that all the sample projects that ship with nServicebus are setup where the sender and host are web roles and worker roles (and hosted via role entry point).
I have a need to do something like this:
Web Role sends message --> On Premise Host handles message
Is it possible to configure an on premise Host to use Azure Queue storage only (and not MSMQ)?
I can't seem to find a single example of this documented anywhere.
Yes this is possible, you simply have to specify the transport when initializing the Bus:
var config = Configure.With()
.SpringBuilder()
.AzureConfigurationSource() <--- Don't use this when working on premise.
.XmlSerializer()
.UnicastBus()
.LoadMessageHandlers()
.AzureQueuesTransport() <--- Configure Azure Storage Queues
.IsTransactional(true)
.PurgeOnStartup(false)
.InMemorySubscriptionStorage();
For the documentation part, I suggest you take a look on github: https://github.com/NServiceBus/NServiceBus/tree/master/Samples/Azure
Note that most of these samples are meant to run in Windows Azure, hence the use of the AzureConfigurationSource. This won't work when you're running on premise since it uses settings from the RoleEnvironment. Don't use AzureConfigurationSource when working on premise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With