Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User specified connection name #104

Closed
vikinghawk opened this issue Apr 8, 2015 · 16 comments
Closed

User specified connection name #104

vikinghawk opened this issue Apr 8, 2015 · 16 comments
Assignees
Milestone

Comments

@vikinghawk
Copy link

Provide an option for a client to specify a "friendly name" for a connection. This would show up in the management plugin top-level connections screen in addition to the current name column. The current name "ip:port" is definitely useful, but can become unusable when you have a bunch of connections from the same ip. The "friendly name" could be used to provide client application specific details and make it easier during troubleshooting to locate specific connections.

Discussion: https://groups.google.com/forum/#!topic/rabbitmq-users/hLSoNqcxeKA

@michaelklishin
Copy link
Member

Effort: medium because it will involve updating client libraries.

@michaelklishin
Copy link
Member

I'm happy to do the client libraries part of this issue.

@michaelklishin michaelklishin modified the milestones: 3.7.0, 3.6.x Feb 23, 2016
@michaelklishin
Copy link
Member

A quick glance at what changes will be required makes me think it should only go into 3.7.0.

@hairyhum
Copy link
Contributor

hairyhum commented Apr 6, 2016

We can use client-properties field in connection.start_ok frame to specify connection name.
We already report client properties in management and can just change formatting for connections table in management.
And client libraries can introduce API for setting this client property as "connection name" or just use existing API to set it.

@michaelklishin
Copy link
Member

That was the plan, more or less.

On 6 abr 2016, at 16:42, Daniil Fedotov notifications@github.com wrote:

We can use client-properties field in connection.start_ok frame to specify connection name.
We already report client properties in management and can just change formatting for connections table in management.
And client libraries can introduce API for setting this client property as "connection name" or just use existing API to set it.


You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub

@hairyhum
Copy link
Contributor

hairyhum commented Apr 6, 2016

Then we can add this to management plugin and clients in 3.6.x.
There will be no breaking changes.

@michaelklishin michaelklishin modified the milestones: 3.6.x, 3.7.0 Apr 6, 2016
@hairyhum
Copy link
Contributor

hairyhum commented Apr 6, 2016

We can also change log messages to support client provided names.

@michaelklishin
Copy link
Member

Sure but in addition to the TCP tuple-based names we have today.

On 6 abr 2016, at 19:06, Daniil Fedotov notifications@github.com wrote:

We can also change log messages to support client provided names.


You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub

@michaelklishin
Copy link
Member

I should expand on the comment above.

We cannot completely replace the connection name(s) we have for several reasons:

  • TCP tuple-based ID are used to close connections or get more specific information on them. We absolutely cannot break this for existing systems.
  • User-provided names are not guaranteed to be unique. TCP tuple-based names are (per node).
  • Per-vhost connection limit #500 still uses TCP tuple-based names heavily.

So the user-provided name, when present, should be listed in a separate column (and on the connection page), not replace the name we have. It will be a useful — and entirely optional — piece of information, not a new connection identification scheme.

@michaelklishin
Copy link
Member

One thing about using client properties that I'm of two minds on is that it's going to work on a per-connection factory basis in the Java and .NET clients. Perhaps this can be seen as a quirk of those two clients, as Ruby, Erlang, Node, Go clients all should effectively have it on a per-connection basis due to how their APIs are structured.

@hairyhum
Copy link
Contributor

hairyhum commented Apr 7, 2016

I'm not sure if it makes sense to implement per factory setting. We can add optional parameter to newConnection/CreateConnection method to start a connection with specific name.

@michaelklishin
Copy link
Member

Yes, looking at the code, that should be about as hard as it was for custom executors.

michaelklishin added a commit to ruby-amqp/bunny that referenced this issue Apr 17, 2016
Makes it much easier to override or provide a custom value,
e.g. for rabbitmq/rabbitmq-server#104.
@michaelklishin michaelklishin modified the milestones: 3.6.2, 3.6.x Apr 17, 2016
@binarin
Copy link
Contributor

binarin commented May 31, 2016

Should this custom name go in logs?

@michaelklishin
Copy link
Member

As an additional piece of information, perhaps.

On 31 may 2016, at 15:30, Alexey Lebedeff notifications@github.com wrote:

Should this custom name go in logs?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

binarin pushed a commit to binarin/rabbitmq-common that referenced this issue Jun 1, 2016
binarin pushed a commit to binarin/rabbitmq-common that referenced this issue Jun 1, 2016
binarin pushed a commit to binarin/rabbitmq-common that referenced this issue Jun 1, 2016
binarin pushed a commit to binarin/rabbitmq-common that referenced this issue Jun 1, 2016
binarin pushed a commit to binarin/rabbitmq-common that referenced this issue Jul 15, 2016
@Freakachoo
Copy link

Is that possible to add connection_name property to response in a list of channel on /api/channels request?
There is property: connection_details, and would be very useful to have custom connection name there too.

@michaelklishin
Copy link
Member

Please post your ideas and suggestions to rabbitmq-users.

@rabbitmq rabbitmq locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants