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
67
67
private bool m_transactionsEnabled ;
68
68
private RabbitMQTransportBindingElement m_transport ;
69
69
70
+ public static readonly long DefaultMaxMessageSize = 8192L ;
71
+
70
72
/// <summary>
71
73
/// Creates a new instance of the RabbitMQBinding class initialized
72
74
/// to use the Protocols.DefaultProtocol. The broker must be set
@@ -143,7 +145,10 @@ public override BindingElementCollection CreateBindingElements()
143
145
m_transport . HostName = this . HostName ;
144
146
m_transport . Port = this . Port ;
145
147
m_transport . BrokerProtocol = this . BrokerProtocol ;
146
- m_transport . MaxReceivedMessageSize = this . MaxMessageSize ;
148
+ if ( MaxMessageSize != DefaultMaxMessageSize )
149
+ {
150
+ m_transport . MaxReceivedMessageSize = MaxMessageSize ;
151
+ }
147
152
BindingElementCollection elements = new BindingElementCollection ( ) ;
148
153
149
154
if ( m_transactionsEnabled )
@@ -172,7 +177,7 @@ private void Initialize()
172
177
m_session = new ReliableSessionBindingElement ( ) ;
173
178
m_compositeDuplex = new CompositeDuplexBindingElement ( ) ;
174
179
m_transactionFlow = new TransactionFlowBindingElement ( ) ;
175
- m_maxMessageSize = 8192L ;
180
+ m_maxMessageSize = DefaultMaxMessageSize ;
176
181
m_isInitialized = true ;
177
182
}
178
183
}
You can’t perform that action at this time.
0 commit comments