bunny
bunny copied to clipboard
Add support for setting client properties
Hey there 👋!
Thank you for providing this library, I'm currently trying it out by porting an existing worker to it and enjoying the experience so far!
One feature I was missing was setting client properties and capabilities, for example, to provide a connection name to more easily identify connections to a server.
- https://www.rabbitmq.com/connections.html#capabilities
- https://www.rabbitmq.com/connections.html#client-provided-names
Enabling Bunny to set client properties is what I'd like to propose with this PR.
$connection = [
'host' => 'HOSTNAME',
'vhost' => 'VHOST', // The default vhost is /
'user' => 'USERNAME', // The default user is guest
'password' => 'PASSWORD', // The default password is guest
'client_properties' => [
'connection_name' => 'It works!,
],
];
Without connection name | With connection name |
---|---|
![]() | ![]() |
I'd appreciate your feedback! I looked if there was a meaningful way to add a test for this, but I'm honestly not sure how to prove that the connection name really is set - all I have are the screenshots above and my word 😅.
I'd appreciate your feedback and am happy to make the needed adjustments to make a merge possible.
:octocat:
Hello, we actually need that feature. This is quite a small change, @jakubkulhan can you take a look, merge and publish a new version ?
I rebased the feature branch with the latest main branch to make sure the changes can still be applied 💪🏻
Gentle ping @WyriHaximus 🙏🏻, I just rebased the branch again.
I also looked at the 0.6 branch, but I'd first have to find my way to see how I could add this there, if it's even needed 🤔
@jeromegamez Thanks for the PR and nudge. I'll have a look at it tomorrow. Been using similar features to add information like pod name to consumers, so I fully welcome and support these features added to Bunny. As for 0.6, lets get it in 0.5 first before adding it to 0.6. 0.6 is a massive internal change from 0.6, but I love that you mention it.
I'll definitely try, but I have to admit, 0.6 isn't easy for me to grasp 🙈. But don't tell me!
Should I target master
or 0.6.x
?
Update: Nevermind, sorry!