tags:

views:

426

answers:

1

I want to figure out how I to set up the Pub/Sub sample from NServiceBus to work in the case of publisher malfunction. When I start the samples and accidentaly close the Subscribers, if I restart everything works fine. If however I kill the publisher and the subscriptions continue to work, if I restart the publisher, then it doesn't seem to know it has subscribers and doesn't post any messages.

I added the config entry <MsmqSubscriptionStorageConfig Queue="subscriptions"/> but it seems to not function... I miss something. I googled about MsmqSubscriptionStorageConfig and DbSubscriptionStorageConfig but i didn't find a solution.

Could someone point me in the right direction ?

+1  A: 

You need to change the profile of the publisher to production. See http://www.nservicebus.com/Profiles.aspx

For debugging this way, go to the properties of the publisher project, into the Debug tab, and put in NServiceBus.Production in the Command line arguments of the Start Options section.

Udi Dahan
I did that, added DB Subscription Storage found in the OrderService sample but I am stuck with the exception "Database was not configured through Database method." In the .config I used sqlite, I belive the sqlite file is not created. How do I set one up ?
Bogdan Nedelcu
Thank you. I found the solution. I missed the UpdateSchema property of the DBSubscriptionStorage node. This is the complete tag in order to work: <DBSubscriptionStorageConfig UpdateSchema="true"> <NHibernateProperties> <add Key="connection.provider" Value="NHibernate.Connection.DriverConnectionProvider"/> <add Key="connection.driver_class" Value="NHibernate.Driver.SQLite20Driver"/> <add Key="connection.connection_string" Value="Data Source=.\Subscriptions.sqlite;Version=3;New=True;"/> <add Key="dialect" Value="NHibernate.Dialec...
Bogdan Nedelcu