Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speeding up shortstr/longstr (de)serialization. #985

Merged
merged 2 commits into from
Dec 10, 2020
Merged
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/client/framing/BasicCancel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1 + 1; // bytes for length of _consumerTag, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += WireFormatting.GetByteCount(_consumerTag); // _consumerTag in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/BasicCancelOk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1; // bytes for length of _consumerTag
bufferSize += Encoding.UTF8.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += WireFormatting.GetByteCount(_consumerTag); // _consumerTag in bytes
return bufferSize;
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/framing/BasicConsume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1; // bytes for _reserved1, length of _queue, length of _consumerTag, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += Encoding.UTF8.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/BasicConsumeOk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1; // bytes for length of _consumerTag
bufferSize += Encoding.UTF8.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += WireFormatting.GetByteCount(_consumerTag); // _consumerTag in bytes
return bufferSize;
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/framing/BasicDeliver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1 + 8 + 1 + 1 + 1; // bytes for length of _consumerTag, _deliveryTag, bit fields, length of _exchange, length of _routingKey
bufferSize += Encoding.UTF8.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_consumerTag); // _consumerTag in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/BasicGet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1; // bytes for _reserved1, length of _queue, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/BasicGetEmpty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1; // bytes for length of _reserved1
bufferSize += Encoding.UTF8.GetByteCount(_reserved1); // _reserved1 in bytes
bufferSize += WireFormatting.GetByteCount(_reserved1); // _reserved1 in bytes
return bufferSize;
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/framing/BasicGetOk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 8 + 1 + 1 + 1 + 4; // bytes for _deliveryTag, bit fields, length of _exchange, length of _routingKey, _messageCount
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
return bufferSize;
}
}
Expand Down
20 changes: 10 additions & 10 deletions projects/RabbitMQ.Client/client/framing/BasicProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,20 @@ internal override int WritePropertiesTo(Span<byte> span)
public override int GetRequiredPayloadBufferSize()
{
int bufferSize = 2; // number of presence fields (14) in 2 bytes blocks
if (IsContentTypePresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_contentType); } // _contentType in bytes
if (IsContentEncodingPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_contentEncoding); } // _contentEncoding in bytes
if (IsContentTypePresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_contentType); } // _contentType in bytes
if (IsContentEncodingPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_contentEncoding); } // _contentEncoding in bytes
if (IsHeadersPresent()) { bufferSize += WireFormatting.GetTableByteCount(_headers); } // _headers in bytes
if (IsDeliveryModePresent()) { bufferSize++; } // _deliveryMode in bytes
if (IsPriorityPresent()) { bufferSize++; } // _priority in bytes
if (IsCorrelationIdPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_correlationId); } // _correlationId in bytes
if (IsReplyToPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_replyTo); } // _replyTo in bytes
if (IsExpirationPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_expiration); } // _expiration in bytes
if (IsMessageIdPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_messageId); } // _messageId in bytes
if (IsCorrelationIdPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_correlationId); } // _correlationId in bytes
if (IsReplyToPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_replyTo); } // _replyTo in bytes
if (IsExpirationPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_expiration); } // _expiration in bytes
if (IsMessageIdPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_messageId); } // _messageId in bytes
if (IsTimestampPresent()) { bufferSize += 8; } // _timestamp in bytes
if (IsTypePresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_type); } // _type in bytes
if (IsUserIdPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_userId); } // _userId in bytes
if (IsAppIdPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_appId); } // _appId in bytes
if (IsClusterIdPresent()) { bufferSize += 1 + Encoding.UTF8.GetByteCount(_clusterId); } // _clusterId in bytes
if (IsTypePresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_type); } // _type in bytes
if (IsUserIdPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_userId); } // _userId in bytes
if (IsAppIdPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_appId); } // _appId in bytes
if (IsClusterIdPresent()) { bufferSize += 1 + WireFormatting.GetByteCount(_clusterId); } // _clusterId in bytes
return bufferSize;
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/framing/BasicPublish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1; // bytes for _reserved1, length of _exchange, length of _routingKey, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
return bufferSize;
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/framing/BasicReturn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1; // bytes for _replyCode, length of _replyText, length of _exchange, length of _routingKey
bufferSize += Encoding.UTF8.GetByteCount(_replyText); // _replyText in bytes
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_replyText); // _replyText in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/ChannelClose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 2 + 2; // bytes for _replyCode, length of _replyText, _classId, _methodId
bufferSize += Encoding.UTF8.GetByteCount(_replyText); // _replyText in bytes
bufferSize += WireFormatting.GetByteCount(_replyText); // _replyText in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/ChannelOpen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1; // bytes for length of _reserved1
bufferSize += Encoding.UTF8.GetByteCount(_reserved1); // _reserved1 in bytes
bufferSize += WireFormatting.GetByteCount(_reserved1); // _reserved1 in bytes
return bufferSize;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1; // bytes for length of _reason
bufferSize += Encoding.UTF8.GetByteCount(_reason); // _reason in bytes
bufferSize += WireFormatting.GetByteCount(_reason); // _reason in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/ConnectionClose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 2 + 2; // bytes for _replyCode, length of _replyText, _classId, _methodId
bufferSize += Encoding.UTF8.GetByteCount(_replyText); // _replyText in bytes
bufferSize += WireFormatting.GetByteCount(_replyText); // _replyText in bytes
return bufferSize;
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/framing/ConnectionOpen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1 + 1 + 1; // bytes for length of _virtualHost, length of _reserved1, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_virtualHost); // _virtualHost in bytes
bufferSize += Encoding.UTF8.GetByteCount(_reserved1); // _reserved1 in bytes
bufferSize += WireFormatting.GetByteCount(_virtualHost); // _virtualHost in bytes
bufferSize += WireFormatting.GetByteCount(_reserved1); // _reserved1 in bytes
return bufferSize;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1; // bytes for length of _reserved1
bufferSize += Encoding.UTF8.GetByteCount(_reserved1); // _reserved1 in bytes
bufferSize += WireFormatting.GetByteCount(_reserved1); // _reserved1 in bytes
return bufferSize;
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/framing/ConnectionStartOk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public override int GetRequiredBufferSize()
{
int bufferSize = 1 + 4 +1; // bytes for length of _mechanism, length of _response, length of _locale
bufferSize += WireFormatting.GetTableByteCount(_clientProperties); // _clientProperties in bytes
bufferSize += Encoding.UTF8.GetByteCount(_mechanism); // _mechanism in bytes
bufferSize += WireFormatting.GetByteCount(_mechanism); // _mechanism in bytes
bufferSize += _response.Length; // _response in bytes
bufferSize += Encoding.UTF8.GetByteCount(_locale); // _locale in bytes
bufferSize += WireFormatting.GetByteCount(_locale); // _locale in bytes
return bufferSize;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public override int GetRequiredBufferSize()
{
int bufferSize = 4 + 1; // bytes for length of _newSecret, length of _reason
bufferSize += _newSecret.Length; // _newSecret in bytes
bufferSize += Encoding.UTF8.GetByteCount(_reason); // _reason in bytes
bufferSize += WireFormatting.GetByteCount(_reason); // _reason in bytes
return bufferSize;
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/framing/ExchangeBind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1 + 1; // bytes for _reserved1, length of _destination, length of _source, length of _routingKey, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_destination); // _destination in bytes
bufferSize += Encoding.UTF8.GetByteCount(_source); // _source in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_destination); // _destination in bytes
bufferSize += WireFormatting.GetByteCount(_source); // _source in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/framing/ExchangeDeclare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1; // bytes for _reserved1, length of _exchange, length of _type, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_type); // _type in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_type); // _type in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/ExchangeDelete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1; // bytes for _reserved1, length of _exchange, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
return bufferSize;
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/framing/ExchangeUnbind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1 + 1; // bytes for _reserved1, length of _destination, length of _source, length of _routingKey, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_destination); // _destination in bytes
bufferSize += Encoding.UTF8.GetByteCount(_source); // _source in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_destination); // _destination in bytes
bufferSize += WireFormatting.GetByteCount(_source); // _source in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/framing/QueueBind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1 + 1; // bytes for _reserved1, length of _queue, length of _exchange, length of _routingKey, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/QueueDeclare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1; // bytes for _reserved1, length of _queue, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/QueueDeclareOk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 1 + 4 + 4; // bytes for length of _queue, _messageCount, _consumerCount
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/QueueDelete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1; // bytes for _reserved1, length of _queue, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
return bufferSize;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/framing/QueuePurge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1; // bytes for _reserved1, length of _queue, bit fields
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
return bufferSize;
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/framing/QueueUnbind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public override int WriteArgumentsTo(Span<byte> span)
public override int GetRequiredBufferSize()
{
int bufferSize = 2 + 1 + 1 + 1; // bytes for _reserved1, length of _queue, length of _exchange, length of _routingKey
bufferSize += Encoding.UTF8.GetByteCount(_queue); // _queue in bytes
bufferSize += Encoding.UTF8.GetByteCount(_exchange); // _exchange in bytes
bufferSize += Encoding.UTF8.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetByteCount(_queue); // _queue in bytes
bufferSize += WireFormatting.GetByteCount(_exchange); // _exchange in bytes
bufferSize += WireFormatting.GetByteCount(_routingKey); // _routingKey in bytes
bufferSize += WireFormatting.GetTableByteCount(_arguments); // _arguments in bytes
return bufferSize;
}
Expand Down
Loading