Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2008

Tip: Looking for answers? Try searching our database.

WCF and MessageQueue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Larsen [CPH] - 10 Apr 2008 10:04 GMT
Hi,

How do i send MSMQ messages using the old way
(System.Messaging.MessageQueue) to a host that use WCF ??
Messages sent through WCF are much bigger than messages created/sent through
MessageQueue.

Is there a way to exchange messages between the two systems ??

BR
Peter
Steven Cheng [MSFT] - 11 Apr 2008 03:51 GMT
Hi Peter,

As for WCF over MSMQ, the messages it transfers is still WCF format
messages(based on the Binding and configuration you use), MSMQ is used as
an transport layer here. Sure, the message size will become larger since it
contains WCF message envelope, and also has other additional overhead due
to the WCF processing pipeline(such as those message processing stacks at
server and client-side).

There does exists some information about optimizing the WCF over MSMQ:

#How can I speed up message processing when using MSMQ with WCF?
http://blogs.msdn.com/drnick/archive/2007/05/07/optimizing-msmq.aspx

However, I'm wondering whether WCF is actually necessary for your scenario?
If the data transfer doesn't quite rely on the WCF features(such as http
transfer, message security.... ), then you can consider still directly use
System.Messaging namespace classes to do the raw MSMQ programming.  If
instead, you want the WCF service side keep using WCF, and the client-side
sending the raw MSMQ message, you can consider using the
MsmqIntegrationBinding. Here are some reference and examples:

#How to: Exchange Messages with WCF Endpoints and Message Queuing
Applications
http://msdn2.microsoft.com/en-us/library/ms789008.aspx

#SOA'izing MSMQ with WCF (and Why It's Worth It)
http://code.msdn.microsoft.com/msmqpluswcf

Anyway, when using WCF it does add some overheard due to the additional
services/features WCF processing pipeline and message envelope attach.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Peter Larsen [CPH]" <PeterLarsen@community.nospam>
>Subject: WCF and MessageQueue
[quoted text clipped - 11 lines]
>BR
>Peter
Peter Larsen [CPH] - 11 Apr 2008 09:46 GMT
Hi Steven,

Thanks for the links.

The point is that i already have a running WCF MSMQ (client/server) setup
and was trying to sent some messages from an older application - whitch did
not work at all. The host takes the message but goes into some kind of a
error state and must be restarted.

Anyway, i'll read the document you link to.

BR
Peter

> Hi Peter,
>
[quoted text clipped - 35 lines]
>
> Microsoft MSDN Online Support Lead
Steven Cheng [MSFT] - 14 Apr 2008 03:24 GMT
Thanks for your reply Peter,

Yes, sending raw MSMQ message may cause problem if the WCF service side is
expecting a WCF friendly message format. the MsmqIntegrationBinding is the
one provided for interop between MSMQ and WCF side, you can try it though
it may still require some certain level of formatting of the raw MSMQ
message. If you have any new finding, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Peter Larsen [CPH]" <PeterLarsen@community.nospam>
>References: <#tL#mnumIHA.4684@TK2MSFTNGP06.phx.gbl>
<gwQ4z73mIHA.9932@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: WCF and MessageQueue
>Date: Fri, 11 Apr 2008 10:46:29 +0200

>Hi Steven,
>
[quoted text clipped - 49 lines]
>>
>> Microsoft MSDN Online Support Lead
Steven Cheng [MSFT] - 16 Apr 2008 11:52 GMT
Hi Peter,

Have you got progress on this issue? Welcome to post here if you have got
any new results or if there is anything else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Content-Transfer-Encoding: 7bit
>From: stcheng@online.microsoft.com (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Mon, 14 Apr 2008 02:24:55 GMT
>Subject: Re: WCF and MessageQueue

>Thanks for your reply Peter,
>
[quoted text clipped - 28 lines]
>>References: <#tL#mnumIHA.4684@TK2MSFTNGP06.phx.gbl>
><gwQ4z
Peter Larsen [CPH] - 16 Apr 2008 12:02 GMT
Hi Steven,

Thank you for your reply.
I haven't tried it yet - but it is one of the first things in the pipeline.

BR
Peter

> Hi Peter,
>
> Have you got progress on this issue? Welcome to post here if you have got
> any new results or if there is anything else we can help.
Steven Cheng [MSFT] - 17 Apr 2008 02:31 GMT
Hi Peter,

Glad to hear from you.

Sure. Welcome to post here if you get any new results.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Peter Larsen [CPH]" <PeterLarsen@community.nospam>
>References: <#tL#mnumIHA.4684@TK2MSFTNGP06.phx.gbl>
<gwQ4z73mIHA.9932@TK2MSFTNGHUB02.phx.gbl>
<#78PGC7mIHA.1680@TK2MSFTNGP06.phx.gbl>
<WjrvAbdnIHA.9016@TK2MSFTNGHUB02.phx.gbl>
<lJfYv$6nIHA.9016@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: WCF and MessageQueue
>Date: Wed, 16 Apr 2008 13:02:23 +0200

>Hi Steven,
>
[quoted text clipped - 8 lines]
>> Have you got progress on this issue? Welcome to post here if you have got
>> any new results or if there is anything else we can help.
Peter Larsen [CPH] - 22 Apr 2008 12:03 GMT
Hi Steven,

I can't get it to work.
Is it possible to create a WCF host that receives messages from both a WCF
client and a MSMQ client ??

The thing is that i have tried to create a host compatible with both the WCF
and the MSMQ method and it seems like the host isn't able to launch when
both is active. Is that true ??

BR
Peter

> Hi Peter,
>
[quoted text clipped - 68 lines]
>>BR
>>Peter
Steven Cheng [MSFT] - 23 Apr 2008 10:47 GMT
Hi Peter,

So what's your current solution model? Are you creating two client
applications, one use System.Messaging api and one use WCF code and they
send message to the same message queue at server-side(which is monitoired
by a WCF service endpoint via MsmqIntegrationBinding)? is this what you're
doing now and what's the error behavior, you cannot receive message from
System.Messaging namespace?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Peter Larsen [CPH]" <PeterLarsen@community.nospam>
>References: <#tL#mnumIHA.4684@TK2MSFTNGP06.phx.gbl>
<gwQ4z73mIHA.9932@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: WCF and MessageQueue
>Date: Tue, 22 Apr 2008 13:03:19 +0200

>Hi Steven,
>
[quoted text clipped - 57 lines]
>> ==================================================
>> Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 19 lines]
>>>BR
>>>Peter
Steven Cheng [MSFT] - 24 Apr 2008 05:35 GMT
Hi Peter,

I've performed some further tests on my side. So far I have the following
application structure work correctly:

** A WCF service which use MsmqIntegrationBinding to listen on a private
transactioal queue

** a WCF client which send WCF message to the above service endpoint

** a MSMQ client(use System.Messaging) which send MSMQ message to the
target transactional queue directly

The service can receive messages from both clients. is this also what you
want to do? If necessary, I can send you my test solution.

Looking forward to your reply.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Content-Type: text/plain
>Content-Transfer-Encoding: 7bit
>From: stcheng@online.microsoft.com (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Wed, 23 Apr 2008 09:47:54 GMT
>Subject: Re: WCF and MessageQueue

>Hi Peter,
>
[quoted text clipped - 122 lines]
>>>>BR
>>>>Peter
Peter Larsen [CPH] - 25 Apr 2008 12:35 GMT
Hi Steven,

Thank you for your reply.
I am not working with this the next two weeks from now.
I still want to find a solution to this, but i have to change focus for a
short period of time.

I appreciate your help.
BR
Peter
Steven Cheng [MSFT] - 28 Apr 2008 03:57 GMT
Hi Peter,

Thanks for your followup.

Sure, no problem. If you need further help later, welcome to post here or
ping me via the email in last message(I can send you my test solution).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Peter Larsen [CPH]" <PeterLarsen@community.nospam>
>References: <#tL#mnumIHA.4684@TK2MSFTNGP06.phx.gbl>
<gwQ4z73mIHA.9932@TK2MSFTNGHUB02.phx.gbl>
<#$xd0hGpIHA.1580@TK2MSFTNGP06.phx.gbl>
<gy3yfcSpIHA.3608@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: WCF and MessageQueue
>Date: Fri, 25 Apr 2008 13:35:04 +0200

>Hi Steven,
>
[quoted text clipped - 6 lines]
>BR
>Peter

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.