rebus-org / Rebus.RabbitMq

:bus: RabbitMQ transport for Rebus
https://mookid.dk/category/rebus
Other
62 stars 44 forks source link

Created configuration to set a consumer tag #115

Closed savissimo closed 3 months ago

savissimo commented 6 months ago

The actual consumer tag is completed by appending a random string to preserve uniqueness. If no option is set, then an empty string is passed, which instructs Rabbit to create a consumer tag.

As discussed in #112.


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

savissimo commented 6 months ago

How can I fix the failed tests? I don't think they relate to my edits, and I haven't defined new tests. What should I do?

mookid8000 commented 6 months ago

What is the purpose of the consumer tag?

savissimo commented 6 months ago

The main purpose of the consumer tag is to identify the connection. It is used to close the connection, and usually it is just generated by the RabbitMQ client. It is possible to set it explicitly, which allows for a better and human-readable identification of the connection in RabbitMQ's admin panel.

mookid8000 commented 6 months ago

Ok, thanks for the explanation 🙂 Would it never be relevant to start two Rebus instances with the same consumer tag? Or does that not make sense, if it's possible even?

savissimo commented 6 months ago

I haven't tried what happens, but it is an handle that can be used to delete the connection, I would avoid using the exact same consumer tag twice. That's why I included a sort of unique bit, so that the actual consumer tag can be "mostly" human readable while still keeping uniqueness.

savissimo commented 3 months ago

Hello, is there any issue with this PR? Can it go forward?

mookid8000 commented 3 months ago

Sorry for being so slow 😅

It's out as Rebus.RabbitMq 9.3.0 on NuGet.org now!

THanks for contributing! 🙂

savissimo commented 3 months ago

Not a problem at all! Thank you for your time.