Skip to content

Conversation

@viktorprogger
Copy link
Contributor

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues #58

@viktorprogger viktorprogger added the status:under development Someone is working on a pull request. label Apr 27, 2023
@viktorprogger viktorprogger requested a review from s1lver April 27, 2023 09:11
@viktorprogger viktorprogger self-assigned this Apr 27, 2023
@viktorprogger viktorprogger linked an issue Apr 27, 2023 that may be closed by this pull request
@what-the-diff
Copy link

what-the-diff bot commented Apr 27, 2023

PR Summary

  • Added private property to Adapter class
    Introduces a new private property for message handling within the Adapter class.
  • Improved push method in the adapter
    Enhanced efficiency by reusing AMQPMessage instances, and ensures message IDs are set when provided by the MessageInterface object.
  • Middleware for generating unique message IDs
    Created middleware to generate unique IDs for messages without one, ensuring all messages pushed into the queue have an ID.

@samdark
Copy link
Member

samdark commented May 3, 2023

Tests?

$this->message = new AMQPMessage('', $this->queueProvider->getMessageProperties());
}

return $this->message;
Copy link
Member

Choose a reason for hiding this comment

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

Scrutinizer review

The expression return $this->message could return the type null which is incompatible with the type-hinted return PhpAmqpLib\Message\AMQPMessage. Consider adding an additional type-check to rule them out.

@viktorprogger
Copy link
Contributor Author

Done in #121

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

Labels

status:under development Someone is working on a pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize message publishing

5 participants