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

Dispatch events around publishing #598

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smatyas
Copy link

@smatyas smatyas commented Sep 18, 2019

Hi, I saw similar requests in #147 and #201 and I wanted this feature to collect more metrics in my application.

Would you consider merging a PR like this?

Of course, we can work more on the details like event names, places etc., I'd just like to know an early answer if it's a no-go.

@smatyas
Copy link
Author

smatyas commented Sep 30, 2019

@videlalvaro is this something you would consider merging?

@mihaileu
Copy link
Collaborator

@theodormanolescu what do you think about this ?

@@ -53,6 +55,7 @@ public function publish($msgBody, $routingKey = '', $additionalProperties = arra
$msg->set('application_headers', $headersTable);
}

$this->dispatchEvent(BeforePublishingMessageEvent::NAME, new BeforePublishingMessageEvent($this, $msg));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep in mind that the signature of the EventDispatcherInterface::dispatch() method has been changed to dispatch($event, string $eventName = null): object since 5.0.0

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

Successfully merging this pull request may close these issues.

None yet

3 participants