still looking for some help on this one...<br><br>thanks in advance.<br><br>re:<br><div class="gmail_quote">On Wed, Jul 29, 2009 at 12:00 PM, Patrick Kenney <span dir="ltr">&lt;<a href="mailto:pekenney@gmail.com">pekenney@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">anybody see anything possible in the code snip below that could cause the message to long error displayed at the bottom? note, this error is occurring on subscribe, not publish...<br>
<br>I can reproduce it on a xp pro workstation and a windows server 2003 box...<br>
<br>&lt;snip&gt;<br>//winform app<br>using System;<br>using System.Collections.Generic;<br>using System.ComponentModel;<br>using System.Collections;<br>using System.Data;<br>using System.Drawing;<br>using System.Linq;<br>

using System.Text;<br>using System.Windows.Forms;<br>using System.ServiceModel.Web;<br>using System.ServiceModel;<br>using System.ServiceModel.Channels;<br>using System.ServiceModel.Description;<br><br>using Test.Base;<br>

using Test.Entity;<br><br>using RabbitMQ.ServiceModel;<br>using RabbitMQ.Client;<br><br>namespace RabbitMqPubSub1<br>{<br>    public partial class frmMain : Form<br>    {<br>        ServiceHost dispatcherHost = null;<br>
        ServiceHost subscriberHost = null;<br>
<br>        string m_strSubscriber = string.Empty;<br>        string m_strDispatcher = string.Empty;<br>        string m_strSubscriberHost = string.Empty;<br><br>        public frmMain()<br>        {<br>            InitializeComponent();<br>

        }<br><br>        /// &lt;summary&gt;<br>        /// Publish Test Message<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;<br>        /// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;<br>

        private void btnPub_Click(object sender, EventArgs e)<br>        {<br>            try<br>            {<br>                using (ChannelFactory&lt;IDispatcherService&gt; scf = GetDispatcherCF())<br>                {<br>

                    IDispatcherService client = scf.CreateChannel();<br>                    Test.Entity.Message msg = new Test.Entity.Message();<br>                    msg.Source = txtPubContent.Text;<br>                    msg.Contexts.Add(&quot;c1&quot;);<br>

<br>                    for (int i = 0; i &lt; 1000; i++) //change seed for generic testing...<br>                    {<br>                        client.Publish(msg);<br>                    }<br>                }<br>            }<br>

            catch (Exception ex)<br>            {<br>                throw ex;<br>            }<br>        }<br><br>        /// &lt;summary&gt;<br>        /// Host The Dispatcher<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;<br>

        /// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;<br>        private void btnHostDispatcher_Click(object sender, EventArgs e)<br>        {<br>            if (txtHostDispatcher.Text == string.Empty)<br>            {<br>

                m_strDispatcher = &quot;amqp:///dispatcher&quot;;<br>            }<br>            else<br>            {<br>                m_strDispatcher = txtHostDispatcher.Text;<br>            }<br>            <br>            dispatcherHost = new ServiceHost(typeof(Dispatcher.DispatcherService), new Uri(&quot;soap.amqp:///&quot;));<br>

            dispatcherHost.AddServiceEndpoint(typeof(IDispatcherService), new RabbitMQBinding(new Uri(&quot;amqp://localhost:5672/&quot;), Protocols.AMQP_0_8), m_strDispatcher);<br>            dispatcherHost.CloseTimeout = TimeSpan.FromMinutes(10); <br>

<br>            dispatcherHost.Open();<br>        }<br><br>        private ChannelFactory&lt;IDispatcherService&gt; GetDispatcherCF()<br>        {<br>            if (txtHostDispatcher.Text == string.Empty)<br>            {<br>

                m_strDispatcher = &quot;amqp:///dispatcher&quot;;<br>            }<br>            else<br>            {<br>                m_strDispatcher = txtHostDispatcher.Text;<div class="im"><br>            }<br><br>
            ChannelFactory&lt;IDispatcherService&gt; scf;<br>
<br>            //The RabbitMQBinding instantiation is where the error is being raised...<br>            scf = new ChannelFactory&lt;IDispatcherService&gt;(<br>                new RabbitMQBinding(<br>                    new Uri(&quot;amqp://localhost:5672/&quot;),<br>

                        Protocols.AMQP_0_8),<br></div>                            new EndpointAddress(m_strDispatcher));<br><br>            return scf;<br>        }<br><br>        /// &lt;summary&gt;<br>        /// Subscribe to queue<br>

        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;<br>        /// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;<br>        private void btnSubscribe_Click(object sender, EventArgs e)<br>

        {   <br>            if (txtHostSubscriberAddress.Text == string.Empty)<br>            {<br>                m_strSubscriber = &quot;amqp:///subscriber&quot;;<br>            }<br>            else<br>            {<br>

                m_strSubscriber = txtHostSubscriberAddress.Text;<br>            }<br><br>            try<br>            {<br>                using (ChannelFactory&lt;IDispatcherService&gt; scf = GetDispatcherCF())<br>                {<br>

                    IDispatcherService client = scf.CreateChannel();<br>                    client.Subscribe(new Test.Base.SubscriberInfo(m_strSubscriber, &quot;c1&quot;, &quot;c2&quot;));<br>                }<br>            }<br>

<br>            catch (Exception ex)<br>            {<br>                throw ex;<br>            }<br>        }<br><br>        /// &lt;summary&gt;<br>        /// Host Subscriber<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;<br>

        /// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;<br>        private void btnHostSubscriber_Click(object sender, EventArgs e)<br>        {<br>            if (txtHostSubscriberAddress.Text == string.Empty)<br>            {<br>

                m_strSubscriberHost = &quot;amqp:///subscriber&quot;;<br>            }<br>            else<br>            {<br>                m_strSubscriberHost = txtHostSubscriberAddress.Text;<br>            }<br><br>
            //The ServiceHost must specify a base or absolute endpoint address under the soap.amqp scheme. <br>
            //An endpoint should then be added to the service using the RabbitMQBinding.<br>            subscriberHost = new ServiceHost(typeof(Subscriber.SubscriberService), new Uri(&quot;soap.amqp:///&quot;));<br>            subscriberHost.AddServiceEndpoint(typeof(ISubscriberService), new RabbitMQBinding(new Uri(&quot;amqp://localhost:5672/&quot;), Protocols.AMQP_0_8), m_strSubscriberHost);<br>

            subscriberHost.CloseTimeout = TimeSpan.FromMinutes(10);<br><br>            subscriberHost.Open();<br>        }<br><br>        /// &lt;summary&gt;<br>        /// Create Queue<br>        /// &lt;/summary&gt;<br>

        /// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;<br>        /// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;<br>        private void btnCreateQueue_Click(object sender, EventArgs e)<br>        {<br>            string address = &quot;localhost:5672&quot;;//&quot;amqp:///&quot;;<br>

            string strQueue = txtQueueName.Text;<br>            bool durable = true;<br>            string exchange = string.Empty;<br>            string routingKey = string.Empty;<br><br>            using (IConnection connection = new ConnectionFactory().CreateConnection(address))<br>

            {<br>                using (IModel model = connection.CreateModel())<br>                {<br>                    strQueue = model.QueueDeclare(strQueue, durable);<br><br>                    model.QueueBind(strQueue, exchange, routingKey, false, null);<br>

                }<br>            }<br>        }<br>    }<br>}<br><br>&lt;/snip&gt;<br><br>RE:<div><div></div><div class="h5"><br><div class="gmail_quote">On Thu, Jul 23, 2009 at 9:13 AM, .... wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

although there are no messages any longer then &quot;test message&quot; in the applicable queue...<br><br>the following is returned...<br><br>The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=311, text=&quot;The body of a message (18446744073709551575 bytes) was too long.&quot;, classId=0, methodId=0, cause=RabbitMQ.Client.Impl.BodyTooLongException: The body of a message (18446744073709551575 bytes) was too long.<br>


   at RabbitMQ.Client.Impl.ContentHeaderBase.ReadFrom(Int32 channelNumber, NetworkBinaryReader reader) in C:\RabbitMQ.Client\RabbitMQ\Client\Impl\ContentHeaderBase.cs:line 23<br>   at RabbitMQ.Client.Impl.CommandAssembler.HandleFrame(Frame f) in C:\RabbitMQ.Client\RabbitMQ\Client\Impl\CommandAssembler.cs:line 53<br>


   at RabbitMQ.Client.Impl.Session.HandleFrame(Frame frame) in C:\RabbitMQ.Client\RabbitMQ\Client\Impl\Session.cs:line 16<br>   at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration() in C:\RabbitMQ.Client\RabbitMQ\Client\Impl\ConnectionBase.cs:line 434<br>


   at RabbitMQ.Client.Impl.ConnectionBase.MainLoop() in C:\RabbitMQ.Client\RabbitMQ\Client\Impl\ConnectionBase.cs:line 388<br><br>suggestions, comments, assistance?<br><br>thanks in advance.<br><br><br>
</blockquote></div><br>
</div></div></blockquote></div><br>