Skip to content

Added method getCallback() in BaseConsumer #433

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

Merged
merged 1 commit into from
Feb 14, 2017
Merged

Added method getCallback() in BaseConsumer #433

merged 1 commit into from
Feb 14, 2017

Conversation

alinilie
Copy link
Contributor

No description provided.

@skafandri
Copy link
Collaborator

is there a use case to get the callback from the consumer?

@alinilie
Copy link
Contributor Author

My bad, i didn't write about the use case from the first time. Having this method will give you access to the callback from event listener (you already have consumer from method getConsumer).

@skafandri
Copy link
Collaborator

Ok, so we get the callback which is a callable, what can we do with it? Except executing it, which is happening anyway.

@alinilie
Copy link
Contributor Author

I will use the class name to create a metric in Graphite (i have a listener for AMQPEvent::BEFORE_PROCESSING_MESSAGE).

@skafandri skafandri merged commit 10317da into php-amqplib:master Feb 14, 2017
@skafandri
Copy link
Collaborator

Be aware that it may return any callable, so handle it in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants