Skip to content

how to use a di injected custom rabbitmq client #2448

Answered by cgillum
vigouredelaruse asked this question in Q&A
Discussion options

You must be logged in to vote

I'm unfortunately not familiar enough with dependency injection and how it works with scoped services. I'm also not familiar enough with the RabbitMQ client library you're using to know whether it plays nicely with scoped services - for example, when does the connection get closed?

I don't think this problem is necessarily specific to Durable Functions, but you might have better luck using a singleton connection factory and managing the lifetime of connections (e.g. connection pooling) yourself.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vigouredelaruse
Comment options

Answer selected by vigouredelaruse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants