Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/AmqpTcpEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public AmqpTcpEndpoint(string hostName, int portOrMinusOne, SslOption ssl,
_port = portOrMinusOne;
Ssl = ssl;
_maxInboundMessageBodySize = Math.Min(maxInboundMessageBodySize,
InternalConstants.DefaultRabbitMqMaxInboundMessageBodySize);
InternalConstants.MaximumRabbitMqMaxInboundMessageBodySize);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/InternalConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ internal static class InternalConstants
/// <summary>
/// Largest message size, in bytes, allowed in RabbitMQ.
/// Note: <code>rabbit.max_message_size</code> setting (https://www.rabbitmq.com/configure.html)
/// configures the largest message size which should be lower than this maximum of 128MiB.
/// configures the largest message size which should not be higher than this maximum of 512MiB.
/// </summary>
internal const uint DefaultRabbitMqMaxInboundMessageBodySize = 1_048_576 * 128;
internal const uint MaximumRabbitMqMaxInboundMessageBodySize = 1_048_576 * 512;

/// <summary>
/// Largest client provide name, in characters, allowed in RabbitMQ.
Expand Down
4 changes: 2 additions & 2 deletions projects/Test/Integration/TestConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ public async Task TestCreateConnectionUsesValidEndpointWhenMultipleSupplied()
public void TestCreateAmqpTCPEndPointOverridesMaxMessageSizeWhenGreaterThanMaximumAllowed()
{
var ep = new AmqpTcpEndpoint("localhost", -1, new SslOption(),
2 * InternalConstants.DefaultRabbitMqMaxInboundMessageBodySize);
Assert.Equal(InternalConstants.DefaultRabbitMqMaxInboundMessageBodySize, ep.MaxInboundMessageBodySize);
2 * InternalConstants.MaximumRabbitMqMaxInboundMessageBodySize);
Assert.Equal(InternalConstants.MaximumRabbitMqMaxInboundMessageBodySize, ep.MaxInboundMessageBodySize);
}

[Fact]
Expand Down
Loading