Few questions about Commanding

Dec 21, 2010 at 10:12 AM

Hi Dennis

Somehow, the newly added receipes are not getting added in the table ( I think some problem with my NServiceBus setup).

When the application is launched, and new receipe is added, i didn't get any exception. Clicking on the Find Receipe button, the newly added receipes are visible. Restarting the application the added receipies are not visible.

I will try to find out, whats the issue at my end. Still I have following questions -

How the commanding service implementation differ as compaied to standard approach in the presentation at sildeshare, when "ServiceBus" is not used and every command there is different response.
For eq. Adding new receipe should generate new ID on server (autoincrement column in table) and this ID should be known to client application.

OR  Deleteing a receipe should notify sucessful delete or reason for not deleting record.






Dec 21, 2010 at 4:50 PM

Hi Rajesh, are you sure the NServiceBus.Host.exe is being started when the Querying.Core project is started. It's the one that will pick up the incoming events from the MSMQ and pass them to the denormalizers. If NServiceBus.Host.exe is not properly started, the UI will not fail. Because of the asynchronity of this example project, the client has some specific logic that assumes that a newly added recipe is added properly. So when you click the Find Recipe button, it will display the new recipe, regardless of any errors on the server. This is in sync with the Eventual Consistency behavior of an architecture like this. For the same reason, commands will not provide an immediate response. The query store should provide some kind of error mechanism that the UI can read. So if you attempt to delete a recipe when it's not allowed, the commanding host should send some specific error event to the query store instead.