Skip to content

Commit c9725e8

Browse files
committed
Set upstream connection_name to hostname
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.
1 parent d444c28 commit c9725e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/amqproxy/upstream.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ module AMQProxy
232232
end
233233

234234
ClientProperties = AMQ::Protocol::Table.new({
235-
connection_name: "AMQProxy #{VERSION}",
235+
connection_name: System.hostname,
236236
product: "AMQProxy",
237237
version: VERSION,
238238
capabilities: {

0 commit comments

Comments
 (0)