Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This doesn't make much sense to me. UI itself is not a logical service.</p> <p>Are the <code>MessageReceivedEvent</code> messages published by the <strong>Message Service</strong> public enough so that any UI can subscribe to that feed? If not, then maybe these messages should not be published at all.</p> <p>If a user is not allowed to process <code>MessageReceivedEvent</code>s unless they're logged in, then it is the resposibility of the <strong>User/Security service</strong> to ensure this is not happening.</p> <p>If <code>MessageReceivedEvent</code>s indeed need to be published, then why not have <strong>user service</strong> running in the <strong>UI</strong> process?</p> <ol> <li><strong>UI</strong> process subscribes (sends a subscription request to <strong>message service</strong>) to <code>MessageReceivedEvent</code></li> <li><strong>UI</strong> sends a <code>LoginUserCommand</code> to remtoe endpoint of the <strong>user service</strong> and locally handles <code>UserLoggedInReply</code></li> <li>There are two handlers for <code>MessageReceivedEvent</code> in the <strong>UI</strong> process <ul> <li>first handler belongs to <strong>user service</strong> and calls bus.DoNotContinueDispatchingCurrentMessageToHandlers() if user isn't logged in</li> <li>second handler belongs to some other service that actually does something useful with <code>MessageReceivedEvent</code>s</li> </ul></li> </ol> <p>In step 3, when a user is logged in, the first handler is a no-op. If the user isn't logged in, the first handler stops the other <code>MessageReceivedEvent</code> handlers from runnig at all.</p> <p>There's more about specifying message order <a href="https://stackoverflow.com/questions/4096841/nservicebus-specifying-message-order">here</a></p> <p>Hope this helps</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload