Skip to content

Commit

Permalink
Simplified message bus message construction, reduce work computing cl…
Browse files Browse the repository at this point in the history
…r type over and over
  • Loading branch information
niemyjski committed Jun 8, 2022
1 parent 1475327 commit 409beb6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Foundatio.Kafka/Foundatio.Kafka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="1.9.0-RC10" />

<PackageReference Include="Foundatio" Version="10.5.0" Condition="'$(ReferenceFoundatioSource)' == '' OR '$(ReferenceFoundatioSource)' == 'false'" />
<PackageReference Include="Foundatio" Version="10.5.1-alpha.0.8" Condition="'$(ReferenceFoundatioSource)' == '' OR '$(ReferenceFoundatioSource)' == 'false'" />
<ProjectReference Include="..\..\..\Foundatio\src\Foundatio\Foundatio.csproj" Condition="'$(ReferenceFoundatioSource)' == 'true'" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/Foundatio.Kafka/Messaging/KafkaMessageBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ protected override async Task EnsureTopicSubscriptionAsync(CancellationToken can
}

protected virtual IMessage ConvertToMessage(string messageType, byte[] data) {
return new Message(() => DeserializeMessageBody(messageType, data)) {
return new Message(DeserializeMessageBody) {
Data = data,
Type = messageType,
ClrType = GetMappedMessageType(messageType),
Data = data
ClrType = GetMappedMessageType(messageType)
};
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.0" PrivateAssets="All" />

<PackageReference Include="Foundatio.TestHarness" Version="10.5.0" Condition="'$(ReferenceFoundatioSource)' == '' OR '$(ReferenceFoundatioSource)' == 'false'" />
<PackageReference Include="Foundatio.TestHarness" Version="10.5.1-alpha.0.8" Condition="'$(ReferenceFoundatioSource)' == '' OR '$(ReferenceFoundatioSource)' == 'false'" />
<ProjectReference Include="..\..\..\Foundatio\src\Foundatio.TestHarness\Foundatio.TestHarness.csproj" Condition="'$(ReferenceFoundatioSource)' == 'true'" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Foundatio.Kafka.Tests.Messaging;
public class KafkaMessageBusTests : KafkaMessageBusTestBase {
public KafkaMessageBusTests(ITestOutputHelper output) : base(output) { }

[Fact]
[Fact(Skip = "https://github.com/confluentinc/confluent-kafka-dotnet/issues/1832")]
public override Task CanSendMessageAsync() {
return base.CanSendMessageAsync();
}
Expand Down

0 comments on commit 409beb6

Please sign in to comment.