Skip to content

Commit 6841350

Browse files
committed
bugfix
1 parent c48e7b0 commit 6841350

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

projects/RabbitMQ.Client/AmqpTcpEndpoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public AmqpTcpEndpoint(string hostName, int portOrMinusOne, SslOption ssl,
7878
_port = portOrMinusOne;
7979
Ssl = ssl;
8080
_maxInboundMessageBodySize = Math.Min(maxInboundMessageBodySize,
81-
InternalConstants.DefaultRabbitMqMaxInboundMessageBodySize);
81+
InternalConstants.MaximumRabbitMqMaxInboundMessageBodySize);
8282
}
8383

8484
/// <summary>

projects/RabbitMQ.Client/InternalConstants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ internal static class InternalConstants
4141
/// <summary>
4242
/// Largest message size, in bytes, allowed in RabbitMQ.
4343
/// Note: <code>rabbit.max_message_size</code> setting (https://www.rabbitmq.com/configure.html)
44-
/// configures the largest message size which should be lower than this maximum of 128MiB.
44+
/// configures the largest message size which should not be higher than this maximum of 512MiB.
4545
/// </summary>
46-
internal const uint DefaultRabbitMqMaxInboundMessageBodySize = 1_048_576 * 128;
46+
internal const uint MaximumRabbitMqMaxInboundMessageBodySize = 1_048_576 * 512;
4747

4848
/// <summary>
4949
/// Largest client provide name, in characters, allowed in RabbitMQ.

projects/Test/Integration/TestConnectionFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ public async Task TestCreateConnectionUsesValidEndpointWhenMultipleSupplied()
320320
public void TestCreateAmqpTCPEndPointOverridesMaxMessageSizeWhenGreaterThanMaximumAllowed()
321321
{
322322
var ep = new AmqpTcpEndpoint("localhost", -1, new SslOption(),
323-
2 * InternalConstants.DefaultRabbitMqMaxInboundMessageBodySize);
324-
Assert.Equal(InternalConstants.DefaultRabbitMqMaxInboundMessageBodySize, ep.MaxInboundMessageBodySize);
323+
2 * InternalConstants.MaximumRabbitMqMaxInboundMessageBodySize);
324+
Assert.Equal(InternalConstants.MaximumRabbitMqMaxInboundMessageBodySize, ep.MaxInboundMessageBodySize);
325325
}
326326

327327
[Fact]

0 commit comments

Comments
 (0)