confluent-kafka-dotnet icon indicating copy to clipboard operation
confluent-kafka-dotnet copied to clipboard

Issue with ConsumerBuilder on macOS Catalyst (ARM64) in Blazor Hybrid App

Open lasoares opened this issue 1 year ago • 4 comments

Description

I'm experiencing an issue with the Confluent.Kafka .NET client version 2.4.0 when attempting to use it in a Blazor Hybrid app targeting maccatalyst-arm64. The error occurs on the following line of code:

_consumer = new ConsumerBuilder<Ignore, string>(config).Build(); When running the Blazor Hybrid application on macOS with the target framework net8.0-maccatalyst, I encounter the following error:

Unsupported platform: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 Interestingly, a similar .net console application targeting osx-arm64 works fine without any issues. This suggests a potential compatibility issue with maccatalyst-arm64.

How to reproduce

  • Create a Blazor Hybrid app targeting maccatalyst-arm64 with .NET 8.0.6.
  • Add the Confluent.Kafka NuGet package (version 2.4.0).
  • Attempt to create a Kafka consumer using ConsumerBuilder<Ignore, string> as shown in the code snippet below:

` var config = new ConsumerConfig { BootstrapServers = "your_kafka_broker_address", GroupId = "your_consumer_group", AutoOffsetReset = AutoOffsetReset.Earliest, EnableAutoCommit = false };

try { _consumer = new ConsumerBuilder<Ignore, string>(config).Build(); } catch (Exception ex) { _logger.LogError(ex.Message); } `

  • Run the application on macOS targeting maccatalyst-arm64.

Operating system

MacOs Sonoma 14.5 ARM64

Additional Information

  • The same configuration and code work without issues in a console application targeting osx-arm64.
  • There may be differences in how maccatalyst and osx handle native dependencies or platform-specific calls, which could be causing this discrepancy.

lasoares avatar Jun 18 '24 00:06 lasoares

We currently don't support maccatalyst-arm64 right now.

anchitj avatar Jun 18 '24 12:06 anchitj

@anchitj Is it on roadmap to be supported?

lasoares avatar Jun 18 '24 12:06 lasoares

If I understand correctly, there’s no solution at the moment. @anchitj

I’m encountering the same error related to "Unsupported platform: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:35:15 PDT 2024; root .122.3~3/RELEASE_ARM64_T8101."

However, in my case, I’m integrating the Kafka library into my MAUI .NET application, and the error triggers when I run it on iOS and Android.

Are there any alternative solutions available?

Dardev12 avatar Aug 19 '24 13:08 Dardev12

@Dardev12 Did you found any alternative?

lasoares avatar Oct 07 '24 15:10 lasoares