File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
projects/wcf/RabbitMQ.ServiceModel/src/serviceModel Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ public sealed class RabbitMQBinding : Binding
6767 private bool m_transactionsEnabled ;
6868 private RabbitMQTransportBindingElement m_transport ;
6969
70+ public static readonly long DefaultMaxMessageSize = 8192L ;
71+
7072 /// <summary>
7173 /// Creates a new instance of the RabbitMQBinding class initialized
7274 /// to use the Protocols.DefaultProtocol. The broker must be set
@@ -143,7 +145,10 @@ public override BindingElementCollection CreateBindingElements()
143145 m_transport . HostName = this . HostName ;
144146 m_transport . Port = this . Port ;
145147 m_transport . BrokerProtocol = this . BrokerProtocol ;
146- m_transport . MaxReceivedMessageSize = this . MaxMessageSize ;
148+ if ( MaxMessageSize != DefaultMaxMessageSize )
149+ {
150+ m_transport . MaxReceivedMessageSize = MaxMessageSize ;
151+ }
147152 BindingElementCollection elements = new BindingElementCollection ( ) ;
148153
149154 if ( m_transactionsEnabled )
@@ -172,7 +177,7 @@ private void Initialize()
172177 m_session = new ReliableSessionBindingElement ( ) ;
173178 m_compositeDuplex = new CompositeDuplexBindingElement ( ) ;
174179 m_transactionFlow = new TransactionFlowBindingElement ( ) ;
175- m_maxMessageSize = 8192L ;
180+ m_maxMessageSize = DefaultMaxMessageSize ;
176181 m_isInitialized = true ;
177182 }
178183 }
You can’t perform that action at this time.
0 commit comments