@@ -146,6 +146,7 @@ namespace RabbitMQ.Client
146
146
public readonly System.Collections.Generic.IDictionary<string, object?> ClientProperties;
147
147
public readonly string? ClientProvidedName;
148
148
public readonly System.TimeSpan ContinuationTimeout;
149
+ public readonly int CopyBodyToMemoryThreshold;
149
150
public RabbitMQ.Client.ICredentialsProvider CredentialsProvider;
150
151
public RabbitMQ.Client.ICredentialsRefresher CredentialsRefresher;
151
152
public readonly int DispatchConsumerConcurrency;
@@ -166,6 +167,7 @@ namespace RabbitMQ.Client
166
167
public sealed class ConnectionFactory : RabbitMQ.Client.ConnectionFactoryBase, RabbitMQ.Client.IConnectionFactory
167
168
{
168
169
public const ushort DefaultChannelMax = 2047;
170
+ public const int DefaultCopyBodyToMemoryThreshold = 2147483647;
169
171
public const uint DefaultFrameMax = 0u;
170
172
public const uint DefaultMaxMessageSize = 134217728u;
171
173
public const string DefaultPass = "guest";
@@ -184,6 +186,7 @@ namespace RabbitMQ.Client
184
186
public string ClientProvidedName { get; set; }
185
187
public int ConsumerDispatchConcurrency { get; set; }
186
188
public System.TimeSpan ContinuationTimeout { get; set; }
189
+ public int CopyBodyToMemoryThreshold { get; set; }
187
190
public RabbitMQ.Client.ICredentialsProvider CredentialsProvider { get; set; }
188
191
public RabbitMQ.Client.ICredentialsRefresher CredentialsRefresher { get; set; }
189
192
public bool DispatchConsumersAsync { get; set; }
@@ -431,9 +434,13 @@ namespace RabbitMQ.Client
431
434
where TProperties : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader;
432
435
void BasicPublish<TProperties>(string exchange, string routingKey, in TProperties basicProperties, System.ReadOnlyMemory<byte> body = default, bool mandatory = false)
433
436
where TProperties : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader;
434
- System.Threading.Tasks.ValueTask BasicPublishAsync<TProperties>(RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, in TProperties basicProperties, System.ReadOnlyMemory <byte> body = default, bool mandatory = false)
437
+ System.Threading.Tasks.ValueTask BasicPublishAsync<TProperties>(RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, in TProperties basicProperties, System.Buffers.ReadOnlySequence <byte> body = default, bool mandatory = false, bool? copyBody = default )
435
438
where TProperties : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader;
436
- System.Threading.Tasks.ValueTask BasicPublishAsync<TProperties>(string exchange, string routingKey, in TProperties basicProperties, System.ReadOnlyMemory<byte> body = default, bool mandatory = false)
439
+ System.Threading.Tasks.ValueTask BasicPublishAsync<TProperties>(RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, in TProperties basicProperties, System.ReadOnlyMemory<byte> body = default, bool mandatory = false, bool? copyBody = default)
440
+ where TProperties : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader;
441
+ System.Threading.Tasks.ValueTask BasicPublishAsync<TProperties>(string exchange, string routingKey, in TProperties basicProperties, System.Buffers.ReadOnlySequence<byte> body = default, bool mandatory = false, bool? copyBody = default)
442
+ where TProperties : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader;
443
+ System.Threading.Tasks.ValueTask BasicPublishAsync<TProperties>(string exchange, string routingKey, in TProperties basicProperties, System.ReadOnlyMemory<byte> body = default, bool mandatory = false, bool? copyBody = default)
437
444
where TProperties : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader;
438
445
void BasicQos(uint prefetchSize, ushort prefetchCount, bool global);
439
446
System.Threading.Tasks.ValueTask BasicQosAsync(uint prefetchSize, ushort prefetchCount, bool global);
@@ -495,12 +502,12 @@ namespace RabbitMQ.Client
495
502
public static System.Threading.Tasks.ValueTask<string> BasicConsumeAsync(this RabbitMQ.Client.IChannel channel, string queue, bool autoAck, string consumerTag, RabbitMQ.Client.IBasicConsumer consumer) { }
496
503
public static System.Threading.Tasks.ValueTask<string> BasicConsumeAsync(this RabbitMQ.Client.IChannel channel, string queue, bool autoAck, string consumerTag, System.Collections.Generic.IDictionary<string, object> arguments, RabbitMQ.Client.IBasicConsumer consumer) { }
497
504
public static System.Threading.Tasks.ValueTask<string> BasicConsumeAsync(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.IBasicConsumer consumer, string queue, bool autoAck = false, string consumerTag = "", bool noLocal = false, bool exclusive = false, System.Collections.Generic.IDictionary<string, object> arguments = null) { }
498
- public static void BasicPublish(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false) { }
499
505
public static void BasicPublish(this RabbitMQ.Client.IChannel channel, string exchange, string routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false) { }
506
+ public static void BasicPublish(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false, bool? copyBody = default) { }
500
507
public static void BasicPublish<T>(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.PublicationAddress addr, in T basicProperties, System.ReadOnlyMemory<byte> body)
501
508
where T : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader { }
502
- public static System.Threading.Tasks.ValueTask BasicPublishAsync(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false) { }
503
- public static System.Threading.Tasks.ValueTask BasicPublishAsync(this RabbitMQ.Client.IChannel channel, string exchange, string routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false) { }
509
+ public static System.Threading.Tasks.ValueTask BasicPublishAsync(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.CachedString exchange, RabbitMQ.Client.CachedString routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false, bool? copyBody = default ) { }
510
+ public static System.Threading.Tasks.ValueTask BasicPublishAsync(this RabbitMQ.Client.IChannel channel, string exchange, string routingKey, System.ReadOnlyMemory<byte> body = default, bool mandatory = false, bool? copyBody = default ) { }
504
511
public static System.Threading.Tasks.ValueTask BasicPublishAsync<T>(this RabbitMQ.Client.IChannel channel, RabbitMQ.Client.PublicationAddress addr, in T basicProperties, System.ReadOnlyMemory<byte> body)
505
512
where T : RabbitMQ.Client.IReadOnlyBasicProperties, RabbitMQ.Client.IAmqpHeader { }
506
513
public static void Close(this RabbitMQ.Client.IChannel channel) { }
@@ -534,6 +541,7 @@ namespace RabbitMQ.Client
534
541
System.Collections.Generic.IDictionary<string, object> ClientProperties { get; }
535
542
string ClientProvidedName { get; }
536
543
RabbitMQ.Client.ShutdownEventArgs CloseReason { get; }
544
+ int CopyBodyToMemoryThreshold { get; }
537
545
RabbitMQ.Client.AmqpTcpEndpoint Endpoint { get; }
538
546
uint FrameMax { get; }
539
547
System.TimeSpan Heartbeat { get; }
0 commit comments