Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]: Incompatibility with Microsoft.IO.RecyclableMemoryStream 3.0.0 #504

Closed
1 task done
morinow opened this issue Jan 9, 2024 · 1 comment · Fixed by #519
Closed
1 task done

[Bug Report]: Incompatibility with Microsoft.IO.RecyclableMemoryStream 3.0.0 #504

morinow opened this issue Jan 9, 2024 · 1 comment · Fixed by #519
Labels
bug Something isn't working

Comments

@morinow
Copy link

morinow commented Jan 9, 2024

Prerequisites

  • I have searched issues to ensure it has not already been reported

Description

It seems like the current KafkaFlow package (3.0.3) is not compatible with the most recent version 3.0.0 of Microsoft.IO.RecyclableMemoryStream. When using 3.0.0 of Microsoft.IO.RecyclableMemoryStream and KafkaFlow together, you encounter an MethodNotFoundException:

Method not found: 'System.IO.MemoryStream Microsoft.IO.RecyclableMemoryStreamManager.GetStream()'

This is most likely due to breaking changes introduced in Microsoft.IO.RecyclableMemoryStream 3.0.0.

I am opening this issue as a bug as this incompatibility comes rather unexpected, even though I am fully aware, that this is of course not at the fault of KafkaFlow.

Maybe there is a way to adjust the current usage of Microsoft.IO.RecyclableMemoryStream to the breaking changes?

Here is a more detailed StackTrace:

---> System.MissingMethodException: Method not found: 'System.IO.MemoryStream Microsoft.IO.RecyclableMemoryStreamManager.GetStream()'.
         at KafkaFlow.Middlewares.Serializer.SerializerProducerMiddleware.Invoke(IMessageContext context, MiddlewareDelegate next)
         at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
         at KafkaFlow.Middlewares.Serializer.SerializerProducerMiddleware.Invoke(IMessageContext context, MiddlewareDelegate next)
         at KafkaFlow.MiddlewareExecutor.ExecuteDefinition(Int32 index, IMessageContext context, Func`2 nextOperation)
         at KafkaFlow.MiddlewareExecutor.Execute(IMessageContext context, Func`2 nextOperation)
         at KafkaFlow.Producers.MessageProducer.ProduceAsync(String topic, Object messageKey, Object messageValue, IMessageHeaders headers, Nullable`1 partition)
         at KafkaFlow.Producers.MessageProducer.ProduceAsync(String topic, Object messageKey, Object messageValue, IMessageHeaders headers, Nullable`1 partition)

Steps to reproduce

  1. Install KafkaFlow package
  2. Install Microsoft.IO.RecyclableMemoryStream 3.0.0
  3. Run anything KafkaFlow related (e.g. produce messages)

Expected behavior

No exception

Actual behavior

Exception

KafkaFlow version

3.0.3

@morinow morinow added the bug Something isn't working label Jan 9, 2024
@sinanerkan
Copy link

Any plans to address this? I have another package which depends on Microsoft.IO.RecyclableMemoryStream as well. They've updated their dependency from 2.3.2 to 3.0.0

Now it's impossible to use a package which uses version 3.0.0 as a dependency alongside with KafkaFlow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants