-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Add message timestamp to amqp connection #37867
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
[Messenger] Add message timestamp to amqp connection #37867
Conversation
src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
Show resolved
Hide resolved
f4be339
to
53cb6a8
Compare
@@ -266,7 +267,7 @@ public function testItSetupsTheConnectionWithDefaults() | |||
); | |||
|
|||
$amqpExchange->expects($this->once())->method('declareExchange'); | |||
$amqpExchange->expects($this->once())->method('publish')->with('body', null, AMQP_NOPARAM, ['headers' => [], 'delivery_mode' => 2]); | |||
$amqpExchange->expects($this->once())->method('publish')->with('body', null, AMQP_NOPARAM, ['headers' => [], 'delivery_mode' => 2, 'timestamp' => ClockMock::time()]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using ClockMock directly, you should use a @group time-sensitive
annotation on the test class itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I see now, fixed :)
53cb6a8
to
9c3989b
Compare
9c3989b
to
281540e
Compare
Thank you @bzajacc. |
Add default timestamp to amqp transport message.
It is useful when you logging each message, and your consumer is down, you alway get right message time when start consume again.