ServiceStack.RabbitMQ compatibility with .NET Aspire #102
-
I'm creating a solution which uses the new .NET Aspire orchestrator support. I would (obviously) love to be able to use the Aspire components for RabbitMQ and Redis along with the ServiceStack support for the same technologies (see here and here) - but I am struggling to get the RabbitMQ component to play nicely with the ServiceStack RabbitMQ implementation. In theory, it sounds like this should be achievable - both rely on the RabbitMQ .NET client, and I can inject a wired-up RabbitMQ ConnectionFactory into a ServiceStack RabbitMqConnectionFactory instance when setting up the MQ Server:
unfortunately, this seems to throw the following error when trying to publish a message :
Could this be because of version differences between the underlying RabbitMQ .NET client? Is there a way around this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
It's because it's using a different / incompatible version RabbitMQ.Client, we haven't upgraded since it contains several breaking changes, but I'll move this to a feature request to upgrading to the latest version for later. |
Beta Was this translation helpful? Give feedback.
-
PR submitted |
Beta Was this translation helpful? Give feedback.
-
Looks like there is still an issue - I get the following error:
looking into the code - it looks like there is an implicit, conversion from byte[] to ReadOnlyMemory which is failing when calling Channel.BasicPublish (the implicit conversion is obviously why there is no build error) :
here is the method called in the RabbitMq.Client library:
I'm not sure if it's appropriate to just do a cast here, or if there is a better way of handling this? |
Beta Was this translation helpful? Give feedback.
just wanted to close this loop : I created a small repo and a ServiceStack solution by running :
for all intents and purposes, it looks like whatever issue I am having is not related to the baseline upgrade
The repo is here if you want to take a look : https://github.com/Ryan-Britton/ServiceStack-RabbitMQUpgradeExample