pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

It is not possible to override some properties in the client configuration (such as Queue.Suffix) #215

Closed Michstumpf closed 7 years ago

Michstumpf commented 7 years ago

Hello, I'm using RawRabbit to create a microservice and I'm having some problems using Queues already existing on my RabbitMQ server (the same thing happens for registering an exchange). It seems that the ".WithName ()" method is not working correctly.

The name of the generated queue is with Suffix, which I would like to remove. Can you help me? Here's an example of how I'm using:

            IBusClient bus = BusClientFactory.CreateDefault(config);
            bus.SubscribeAsync<TEvent>(async (msg, context) =>
            {
                await handler.HandleAsync(msg);
            },
                config =>
                config
                .WithQueue(q =>
                q
                .WithName("my_queue_name"))
                );

The queue name on the server looks like this: "my_queue_name_my_application"

Thanks in advance

pardahlman commented 7 years ago

Hello @Michstumpf! Looks like you're running 1.10.x. It sounds very much like this issue: https://github.com/pardahlman/RawRabbit/issues/210#issuecomment-291149809 take a look and see if the response helps!

pardahlman commented 7 years ago

Closing this now. Feel free to re-open if the suggested approach doesn't work for you!

Michstumpf commented 7 years ago

Hello, sorry for the delay in reply. It really did not work for me this suggestion, I do not know what I'm doing wrong. I tested all the alternatives in the last days and did not succeed.

Do you mind forwarding me a simple example to override this setting?

alpeshv commented 7 years ago

@Michstumpf have a look at #217 or http://stackoverflow.com/questions/43521608/rawrabbit-set-queue-name-with-or-without-inamingconvention