Skip to content

Commit 96ae441

Browse files
Do not include kafka.
1 parent e2deb3e commit 96ae441

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageProjectUrl>https://github.com/squidex/squidex</PackageProjectUrl>
1212
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1313
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
14-
<Version>6.35.0</Version>
14+
<Version>6.36.0</Version>
1515
</PropertyGroup>
1616

1717
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

messaging/Squidex.Messaging.All/MessagingServiceExtensions.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ namespace Microsoft.Extensions.DependencyInjection;
1212

1313
public static class MessagingServiceExtensions
1414
{
15-
public static MessagingBuilder AddTransport(this MessagingBuilder builder, IConfiguration config)
15+
public static MessagingBuilder AddTransport(this MessagingBuilder builder, IConfiguration config, Alternatives? custom = null)
1616
{
17-
config.ConfigureByOption("messaging:type", new Alternatives
17+
var options = new Alternatives
1818
{
1919
["MongoDb"] = () =>
2020
{
@@ -28,10 +28,6 @@ public static MessagingBuilder AddTransport(this MessagingBuilder builder, IConf
2828
{
2929
builder.AddGooglePubSubTransport(config);
3030
},
31-
["Kafka"] = () =>
32-
{
33-
builder.AddKafkaTransport(config);
34-
},
3531
["RabbitMq"] = () =>
3632
{
3733
builder.AddRabbitMqTransport(config);
@@ -40,7 +36,17 @@ public static MessagingBuilder AddTransport(this MessagingBuilder builder, IConf
4036
{
4137
builder.AddRedisTransport(config);
4238
},
43-
});
39+
};
40+
41+
if (custom != null)
42+
{
43+
foreach (var (key, configure) in custom)
44+
{
45+
options[key] = configure;
46+
}
47+
}
48+
49+
config.ConfigureByOption("messaging:type", options);
4450

4551
return builder;
4652
}

messaging/Squidex.Messaging.All/Squidex.Messaging.All.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<ItemGroup>
3232
<ProjectReference Include="..\Squidex.Messaging.EntityFramework\Squidex.Messaging.EntityFramework.csproj" />
3333
<ProjectReference Include="..\Squidex.Messaging.GoogleCloud\Squidex.Messaging.GoogleCloud.csproj" />
34-
<ProjectReference Include="..\Squidex.Messaging.Kafka\Squidex.Messaging.Kafka.csproj" />
3534
<ProjectReference Include="..\Squidex.Messaging.Mongo\Squidex.Messaging.Mongo.csproj" />
3635
<ProjectReference Include="..\Squidex.Messaging.RabbitMq\Squidex.Messaging.RabbitMq.csproj" />
3736
<ProjectReference Include="..\Squidex.Messaging.Redis\Squidex.Messaging.Redis.csproj" />

messaging/Squidex.Messaging.Tests/Squidex.Messaging.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<ItemGroup>
4646
<ProjectReference Include="..\Squidex.Messaging.All\Squidex.Messaging.All.csproj" />
4747
<ProjectReference Include="..\Squidex.Messaging.EntityFramework\Squidex.Messaging.EntityFramework.csproj" />
48+
<ProjectReference Include="..\Squidex.Messaging.Kafka\Squidex.Messaging.Kafka.csproj" />
4849
<ProjectReference Include="..\Squidex.Messaging.Subscriptions\Squidex.Messaging.Subscriptions.csproj" />
4950
</ItemGroup>
5051

0 commit comments

Comments
 (0)