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

Feature Request: Add a URL property on the connection object #63

Closed
mehcode opened this issue Mar 22, 2015 · 3 comments
Closed

Feature Request: Add a URL property on the connection object #63

mehcode opened this issue Mar 22, 2015 · 3 comments
Assignees
Milestone

Comments

@mehcode
Copy link

mehcode commented Mar 22, 2015

It'd be nice for logging to show Connected to amqp://... and it'd make it easier on the usage code if the connection could remember its connection information.

If you're okay with this I don't mind submitting a PR for it.

@arobson
Copy link
Collaborator

arobson commented Mar 22, 2015

@mehcode - adding a log statement is fine. The connection does keep connection information. Can you be more specific about what you're trying to accomplish? Wascally already handles things like reconnection and multiple connections. What are you attempting to solve for?

@mehcode
Copy link
Author

mehcode commented Mar 22, 2015

I'm not seeing it then. Apologies. If I have a connection object from rabbit.connections.default how do I get at the connection information that was used to connect? I'd like to just log the URI it connected to.

@arobson
Copy link
Collaborator

arobson commented Apr 21, 2015

@mehcode - PR #66 addresses this. You'll just need to attach to the 'connected' event and the connection object will have a uri property.

rabbit.on( 'connected', function( connection ) {
   console.log( connection.uri );
} );

@arobson arobson added this to the 0.2.5 milestone Apr 21, 2015
@arobson arobson closed this as completed Apr 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants