A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/apache/pulsar-dotpulsar/commit/09dd18e90926cd657842e967a989f1dbad3a7312 below:

The producer shouldn't send the schema to the broker when the schema … · apache/pulsar-dotpulsar@09dd18e · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+30

-5

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+30

-5

lines changed Original file line number Diff line number Diff line change

@@ -4,14 +4,15 @@ All notable changes to this project will be documented in this file.

4 4 5 5

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

6 6 7 -

## [Unreleased]

7 +

## [4.2.1-rc.1] - 2025-03-12

8 8 9 9

### Changed

10 10 11 11

- Updated the Microsoft.Extensions.ObjectPool dependency from version 9.0.2 to 9.0.3

12 12

- Updated the Microsoft.Bcl.AsyncInterfaces dependency from version 9.0.2 to 9.0.3 for .NET Standard 2.0

13 13

- Updated the System.Diagnostics.DiagnosticSource dependency from version 9.0.2 to 9.0.3 for .NET Standard 2.0 and 2.1

14 14

- Updated the System.IO.Pipelines dependency from version 9.0.2 to 9.0.3 for .NET 8 and 9

15 +

- The producer no longer sends the schema to the broker when the schema type is 'None'

15 16 16 17

## [4.2.0] - 2025-03-06

17 18 Original file line number Diff line number Diff line change

@@ -48,10 +48,12 @@ public ProducerChannelFactory(

48 48

{

49 49

ProducerName = producerName,

50 50

ProducerAccessMode = producerAccessMode,

51 -

Topic = topic,

52 -

Schema = _schema

51 +

Topic = topic

53 52

};

54 53 54 +

if (_schema.Type != Schema.SchemaType.None)

55 +

_commandProducer.Schema = _schema;

56 + 55 57

if (properties is not null)

56 58

_commandProducer.Metadatas.AddRange(properties.Select(x => new KeyValue { Key = x.Key, Value = x.Value }));

57 59 Original file line number Diff line number Diff line change

@@ -279,10 +279,10 @@ public async Task Send_WhenSendingToTopicWithSchemaAndProducerHasWrongSchema_Sho

279 279

var pulsarSchema = Schema.AvroISpecificRecord<ValidModel>();

280 280

await _fixture.AddSchemaToExistingTopic(topicName, pulsarSchema.SchemaInfo, _cts.Token);

281 281

var client = CreateClient();

282 -

await using var producer = CreateProducer(client, topicName, Schema.ByteSequence);

282 +

await using var producer = CreateProducer(client, topicName, Schema.String);

283 283 284 284

//Act

285 -

var exception = await Record.ExceptionAsync(producer.Send(Encoding.UTF8.GetBytes("test"), _cts.Token).AsTask);

285 +

var exception = await Record.ExceptionAsync(producer.Send("test", _cts.Token).AsTask);

286 286 287 287

//Assert

288 288

exception.ShouldNotBeNull();

@@ -326,6 +326,28 @@ public async Task Send_WhenSendingToTopicWithSchemaAndProducerHasRightGenericRec

326 326

exception.ShouldBeNull();

327 327

}

328 328 329 +

[Fact]

330 +

public async Task Send_WhenSendingToTopicWithSchemaAndProducerNoSchema_ShouldBeAbleToSend()

331 +

{

332 +

//Arrange

333 +

var topicName = await _fixture.CreateTopic(_cts.Token);

334 +

await _fixture.AddSchemaToExistingTopic(topicName, Schema.String.SchemaInfo, _cts.Token);

335 +

await using var client = CreateClient();

336 +

await using var stringProducer = CreateProducer(client, topicName, Schema.String);

337 +

await using var byteArrayProducer = CreateProducer(client, topicName, Schema.ByteArray);

338 +

await using var byteSequenceProducer = CreateProducer(client, topicName, Schema.ByteSequence);

339 + 340 +

//Act

341 +

var stringException = await Record.ExceptionAsync(stringProducer.Send("test", _cts.Token).AsTask);

342 +

var byteArrayException = await Record.ExceptionAsync(byteArrayProducer.Send(Encoding.UTF8.GetBytes("test"), _cts.Token).AsTask);

343 +

var byteSequenceException = await Record.ExceptionAsync(byteSequenceProducer.Send(Encoding.UTF8.GetBytes("test"), _cts.Token).AsTask);

344 + 345 +

//Assert

346 +

stringException.ShouldBeNull();

347 +

byteArrayException.ShouldBeNull();

348 +

byteSequenceException.ShouldBeNull();

349 +

}

350 + 329 351

[Fact]

330 352

public async Task Connectivity_WhenConnectionIsInitiallyUpAndGoesDown_ShouldBeAbleToSendWhileDown()

331 353

{

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4