NServiceBus, WCF and WebService

NServiceBus is not a replacement for WCF, but the only way to host NServiceBus process is through NServiceBus.host.exe, instead of IIS or WAS.

Those message handlers are automatically wired up by NServiceBus.host.exe, you don’t want to do it by yourself by code at WCF server side.

NServiceBus process can be exposed as WCF service, as shown in the WcfIntegration sample app, the endpoint is set in app.config:

<add baseAddress=”http://localhost:9009/services/cancelOrder&#8221; />

The only method in this WCF service is process().

What’s the reason to do this instead of client send the message by itself?

Maybe, for some reason, the client, including web server, can not talk to MSMQ directly, by calling a WCF service, the WCF service can send the message on client’s request.

The WCFIntegration sample in NSB codebase is combining the message sending and processing in the same project, kind of confuse.

In WebServiceBridge sample, this is a little bit clear, so called bridge between client and NSB message processor, as it demonstrated.

Advertisements

One thought on “NServiceBus, WCF and WebService

  1. Pingback: NServiceBus Weekly: #7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s