<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
h1
        {margin-top:17.0pt;
        margin-right:0cm;
        margin-bottom:16.5pt;
        margin-left:0cm;
        text-align:justify;
        text-justify:inter-ideograph;
        text-indent:0cm;
        line-height:240%;
        page-break-after:avoid;
        mso-list:l0 level1 lfo4;
        font-size:22.0pt;
        font-family:"Times New Roman";}
h3
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        text-indent:0cm;
        line-height:12.0pt;
        page-break-after:avoid;
        mso-list:l0 level3 lfo4;
        font-size:10.0pt;
        font-family:Arial;
        font-weight:normal;}
h5
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        mso-para-margin-top:12.0pt;
        mso-para-margin-right:1.0gd;
        mso-para-margin-bottom:3.0pt;
        mso-para-margin-left:0cm;
        text-indent:0cm;
        line-height:12.0pt;
        mso-list:l0 level5 lfo4;
        font-size:11.0pt;
        font-family:"Times New Roman";
        font-weight:normal;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:3.2pt;
        margin-left:0cm;
        text-align:justify;
        text-justify:inter-ideograph;
        text-indent:0cm;
        line-height:133%;
        page-break-after:avoid;
        mso-list:l0 level7 lfo4;
        font-size:12.0pt;
        font-family:"Times New Roman";
        font-weight:bold;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:SimSun;}
p.heading7, li.heading7, div.heading7
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:20.0pt;
        margin-bottom:.0001pt;
        mso-para-margin-top:0cm;
        mso-para-margin-right:1.0gd;
        mso-para-margin-bottom:0cm;
        mso-para-margin-left:1.0gd;
        mso-para-margin-bottom:.0001pt;
        line-height:12.0pt;
        font-size:10.0pt;
        font-family:"Times New Roman";}
p.StyleHeading7Right1ch, li.StyleHeading7Right1ch, div.StyleHeading7Right1ch
        {margin-top:12.0pt;
        margin-right:10.0pt;
        margin-bottom:3.0pt;
        margin-left:0cm;
        mso-para-margin-top:12.0pt;
        mso-para-margin-right:1.0gd;
        mso-para-margin-bottom:3.0pt;
        mso-para-margin-left:0cm;
        text-indent:0cm;
        line-height:12.0pt;
        mso-list:l0 level7 lfo4;
        font-size:10.0pt;
        font-family:"Times New Roman";}
p.StyleHeading3TimesNewRomanBoldNotItalic, li.StyleHeading3TimesNewRomanBoldNotItalic, div.StyleHeading3TimesNewRomanBoldNotItalic
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        text-indent:0cm;
        line-height:12.0pt;
        page-break-after:avoid;
        mso-list:l0 level3 lfo4;
        font-size:10.0pt;
        font-family:Arial;
        font-weight:bold;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 126.65pt 72.0pt 126.65pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:-5;
        mso-list-template-ids:1262271446;}
@list l0:level1
        {mso-level-style-link:"Heading 1";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level2
        {mso-level-text:"%1\.%2";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level3
        {mso-level-style-link:"Heading 3";
        mso-level-text:"%1\.%2\.%3";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level4
        {mso-level-text:"%1\.%2\.%3\.%4";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level5
        {mso-level-style-link:"Heading 5";
        mso-level-text:"%1\.%2\.%3\.%4\.%5";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level6
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level7
        {mso-level-style-link:"Heading 7";
        mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level8
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
@list l0:level9
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        mso-level-legacy:yes;
        mso-level-legacy-indent:0cm;
        mso-level-legacy-space:7.2pt;
        margin-left:0cm;
        text-indent:0cm;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
</head>
<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=Section1 style='layout-grid:15.6pt'>
<p class=MsoPlainText><font size=1 face=宋体><span lang=EN-US
style='font-size:9.0pt'>Hi all,<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color=black face=宋体><span
lang=EN-US style='font-size:9.0pt;color:black'> </span><span
lang=EN-US>I am use Wcf and RabbitMQ to make project. I can use Wcf bind
RabbitMQ to work normal as below ,but I don</span></font><font color=black
face="Courier New"><span lang=EN-US style='font-family:"Courier New";
color:black'>’</span></font><font color=black><span lang=EN-US
style='color:black'>t know how to make Wcf bind to rabbitmq exchange and queue,
could you help me? Many thanks!<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color=black face=宋体><span
lang=EN-US><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>C# code:<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>namespace Server<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>{<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> using
System;<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> using
System.ServiceModel;<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> using
WcfServiceLibrary1;<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> using
RabbitMQ.ServiceModel;<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> class
Server<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> {<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
public void Run()<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
{<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
ServiceHost host = new ServiceHost(typeof(HelloService));<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
host.Open();<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
Console.WriteLine("Service Ready");<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
Console.ReadLine();<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
host.Close();<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>
}<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'> }<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#3366ff" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#3366FF'>}<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color=black face=宋体><span
lang=EN-US><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=1 color=black face=宋体><span
lang=EN-US style='font-size:9.0pt;color:black'>Config file:<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'><?xml
version="1.0" encoding="utf-8" ?><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'><configuration><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<system.serviceModel><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'> <o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<services><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<service name="WcfServiceLibrary1.HelloService"><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<host><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<baseAddresses><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<add baseAddress="soap.amqp:///" /><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</baseAddresses><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</host><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<endpoint<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
address="Hello"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
binding="rabbitMQBinding"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
bindingConfiguration="rabbitMQConfig"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
contract="WcfServiceLibrary1.IHelloContract"/><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</service><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</services><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<bindings><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<rabbitMQBinding><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<binding name="rabbitMQConfig"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'> broker="amqp://192.168.1.87:5672/"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'> protocolversion="AMQP_0_8"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
oneWay="false"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'> /><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</rabbitMQBinding><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</bindings><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'> <o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<extensions><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<bindingExtensions><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
<add<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
name="rabbitMQBinding"<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
type="RabbitMQ.ServiceModel.RabbitMQBindingSection, RabbitMQ.ServiceModel,
Version=1.0.110.0, Culture=neutral, PublicKeyToken=null"/><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</bindingExtensions><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</extensions><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'> <o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'>
</system.serviceModel><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=1 color="#ff6600" face=宋体><span
lang=EN-US style='font-size:9.0pt;color:#FF6600'></configuration><o:p></o:p></span></font></p>
</div>
</body>
</html>