-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Add options at the publish level of the gps sender #24
base: master
Are you sure you want to change the base?
Conversation
…tamp and modify documentation GpsSenderOptionsStamp
$this->pubSubClient | ||
->topic($this->gpsConfiguration->getTopicName()) | ||
->publish($messageBuilder->build()) | ||
->publish($messageBuilder->build(), $options) |
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.
$options
might be undefined if GpsSenderOptionsStamp
is not in the envelope
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.
yes, please put the $options = []
before the if statement or put here $options ?? []
$this->pubSubClient | ||
->topic($this->gpsConfiguration->getTopicName()) | ||
->publish($messageBuilder->build()) | ||
->publish($messageBuilder->build(), $options) |
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.
yes, please put the $options = []
before the if statement or put here $options ?? []
/** | ||
* @param array<string, mixed> $options | ||
*/ | ||
public function __construct(array $options) { |
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.
Please, put it on a new line. https://www.php-fig.org/psr/psr-12/#44-methods-and-functions
This is a proposal to add options to the publish method of google pub/sub on the GpsSender
I added a specific stamp for this.
I propose it in the need on a project to use this in addition to the orderingKey :
gps->publish(messageBuilder->build, ["enableMessageOrdering" => true]);