saunter icon indicating copy to clipboard operation
saunter copied to clipboard

RabbitMQ.Client.Core.DependencyInjection Support

Open JanEggers opened this issue 3 years ago • 4 comments

I am currently using RabbitMQ.Client.Core.DependencyInjection so I have all the information in the di container and I dont want to add attributes to all the implementations that contain redundant information.

so what i would like to see is:

public interface IOperationProvider
{
       IEnumerable<(string channelname, Type payloadtype ,OperationType)> ProvideOperations()
}

this lib could provide the default implementation with the code in DocumentGenerator but I would be able to tap into the di container and use the information that is present there.

JanEggers avatar Nov 19 '20 07:11 JanEggers

I'm happy to expose such an interface as it would allow for any client to make their own discovery mechanism.

I am curious as to how you would make use of the DI container to get the information such as channelName, payloadType, etc. If you could provide an example or more description then I will be able to ensure the solution meets your needs.

Thanks

m-wild avatar Nov 23 '20 00:11 m-wild

the lib provides a way to declare msg handlers via di. they have descriptors for exchanges and queues in my code i have a similar descriptor that also adds the routing key and payload type.

JanEggers avatar Nov 23 '20 13:11 JanEggers

Is this similar to #101 ?

m-wild avatar Jul 28 '21 10:07 m-wild

yes

JanEggers avatar Jul 28 '21 11:07 JanEggers