Skip to content

Commit

Permalink
Set upstream connection_name to hostname
Browse files Browse the repository at this point in the history
Kubernetes exposes the podname via the `gethostname` glibc call. This
will show the podname as the easy to read identifier for the connection.

Fixes #187

Could expose it as a config variable too, but I think this addresses the
need and is much simplier, both as a patch and for the user to use.
  • Loading branch information
carlhoerberg committed Nov 11, 2024
1 parent d444c28 commit 4e84811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/amqproxy/upstream.cr
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ module AMQProxy
end

ClientProperties = AMQ::Protocol::Table.new({
connection_name: "AMQProxy #{VERSION}",
connection_name: System.hostname,
product: "AMQProxy",
version: VERSION,
capabilities: {
Expand Down

0 comments on commit 4e84811

Please sign in to comment.