Skip to content

[Messenger] InMemoryTransport ignore acknowledged and rejected messages #12045

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
Aug 20, 2019
Merged

[Messenger] InMemoryTransport ignore acknowledged and rejected messages #12045

merged 1 commit into from
Aug 20, 2019

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Jul 27, 2019

No description provided.

@OskarStark OskarStark added this to the 4.4 milestone Jul 28, 2019
@OskarStark OskarStark added the Waiting Code Merge Docs for features pending to be merged label Jul 28, 2019
fabpot added a commit to symfony/symfony that referenced this pull request Aug 18, 2019
…rejected messages (tienvx)

This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] InMemoryTransport handle acknowledged and rejected messages

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/12045 <!-- required for new features -->

This PR do 2 things:
* Limit receiving messages from InMemoryTransport to 1 (reverted, another PR will fix the bug: worker does not stop when receiver return more messages than the number specify by the `--limit` option)
* Handle acknowledged and rejected messages in InMemoryTransport. Currently, it does not care about acknowledged and rejected messages. So it always return all messages that have been sent. So if we run console command `messenger:consume`, it will never stop, even though we set the `--limit` option.

For more information, please check the [reproduction](https://github.com/tienvx/symfony-messenger-in-memory-reproduction) project for the expected behavior.

See also my [messenger-memory-transport](https://github.com/tienvx/messenger-memory-transport) project

Commits
-------

71e7bdf [Messenger] InMemoryTransport handle acknowledged and rejected messages
@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Aug 20, 2019
@OskarStark OskarStark changed the base branch from master to 4.4 August 20, 2019 09:50
@OskarStark
Copy link
Contributor

It took time, but here we go, this is in now. Thank you very much @tienvx.

OskarStark added a commit that referenced this pull request Aug 20, 2019
…rejected messages (tienvx)

This PR was submitted for the master branch but it was merged into the 4.4 branch instead (closes #12045).

Discussion
----------

[Messenger] InMemoryTransport ignore acknowledged and rejected messages

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

354b84d [Messenger] InMemoryTransport ignore acknowledged and rejected messages
@OskarStark OskarStark merged commit 354b84d into symfony:4.4 Aug 20, 2019
@tienvx tienvx deleted the handle-acknowledged-rejected-messages branch August 20, 2019 09:55
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.

3 participants