Hi Sean,

You probably also have to tweak the SOAP encoder you are using to
handle large messages.  By default, the AmqpBinding uses the WCF
BinaryMessageEncoding encoder.  The following code snippet should
illustrate:

            AmqpBinding amqpBindingTemplate = new AmqpBinding();
            // make a copy to expose the encoder
            CustomBinding amqpBinding = new CustomBinding(amqpBindingTemplate);
            BindingElementCollection bec = amqpBinding.Elements;
            foreach (BindingElement be in bec)
            {
                BinaryMessageEncodingBindingElement enc = be as
BinaryMessageEncodingBindingElement;
                if (enc != null)
                {
                    XmlDictionaryReaderQuotas quotas = enc.ReaderQuotas;
                    quotas.MaxArrayLength = int.MaxValue;
                    quotas.MaxBytesPerRead = int.MaxValue;
                }
            }

            // use ampBinding with new reader quotas to build channels...


This step is not needed if you use the AmqpBinaryBinding, since it has
no added SOAP baggage (but it has its own peculiarities).

For the difference between the SOAP and binary bindings, see

  http://qpid.apache.org/books/0.8/Programming-In-Apache-Qpid/html/ch04.html


Cliff


On Tue, Apr 12, 2011 at 9:43 AM,  <[email protected]> wrote:
> It there a way to configure sending large messages? I have updated the 
> binding and transport to increase the maxBufferSize, MaxBufferPoolSize & 
> MaxReceivedMessageSize. The client (sender) looks like the large message is 
> being sent and it looks like the broker receives and resends but the server 
> (receiver) does not get the message.
>
> Thoughts?
>
> -----Original Message-----
> From: Cliff Jansen [mailto:[email protected]]
> Sent: Monday, April 11, 2011 3:25 AM
> To: [email protected]
> Cc: Hubbell, Sean-W49290
> Subject: Re: Question: I do not seem to be receiving messages using C#
>
> Hi Sean,
>
> I believe the problem you are having is that you are not pre-creating
> the message_queue before running the example.  This is the fault of
> the way the examples are structured in the Qpid source tree versus the
> image in the installer.  A bug
> (https://issues.apache.org/jira/browse/QPID-3196) has been filed to
> track fixing this.
>
> The missing step is the QCreate step in
> http://svn.apache.org/repos/asf/qpid/trunk/qpid/wcf/ReadMe.txt
> regarding running the samples.  But I believe you are missing QCreate
> too.
>
> The easiest workaround is to use alternate WCF endpoints consistent
> with the newer Qpid messaging naming conventions.  Try the following
> change to Service.cs
>
>  66c66
>  <             Uri amqpUri = new Uri("amqp:message_queue");
>  ---
>  >             Uri amqpUri = new Uri("amqp:message_queue;{create:always}");
>
>
> and to Client.cs:
>
>  40c40
>  <                 Uri amqpClientUri = new
> Uri("amqp:amq.direct?routingkey=routing_key");
>  ---
>  >                 Uri amqpClientUri = new Uri("amqp:message_queue");
>
>
> Cliff
>
>
> On Fri, Apr 8, 2011 at 7:20 AM, Sean Hubbell <[email protected]> wrote:
>> Hello,
>>
>>  I have installed qpidc using the qpidc-0.8-x86.msi installer. I am seeing
>> an issue that the broker is not forwarding the messages to the server from
>> the WCFToWCFDirect example. I have tried this one two computers with no
>> luck. Here is a trace of the C++ broker:
> [ snip ]
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to