Skip to content

publish message with custom queue options : flags | attributes #30225

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 3 commits into from
Feb 21, 2019

Conversation

insidestyles
Copy link
Contributor

@insidestyles insidestyles commented Feb 13, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

option for publish persistent message:
amqp://localhost/%2f/messages?queue[attributes][delivery_mode]=2&queue[flags]=1
or
options:

queue:

name: '%env(MESSENGER_QUEUE)%'
routing_key: '%env(MESSENGER_ROUTING_KEY)%'
attributes:

delivery_mode: 2

flags: 1

@nicolas-grekas nicolas-grekas added this to the next milestone Feb 16, 2019
$amqpExchange->expects($this->once())->method('publish')
->with('body', null, 1, ['delivery_mode' => 2, 'headers' => ['token' => 'uuid', 'type' => '*']]);

$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[attributes][delivery_mode]=2&queue[attributes][headers][token]=uuid&queue[flags]=1', [], true, $factory);
Copy link
Contributor

Choose a reason for hiding this comment

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

line break for the parameters would be nice for further diffs and readability, otherwise 👍

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

@insidestyles Can you submit a PR on the docs for the new options?

@fabpot
Copy link
Member

fabpot commented Feb 21, 2019

Thank you @insidestyles.

@fabpot fabpot merged commit 5e16053 into symfony:master Feb 21, 2019
fabpot added a commit that referenced this pull request Feb 21, 2019
…tributes (fedor.f, insidestyles)

This PR was merged into the 4.3-dev branch.

Discussion
----------

publish message with custom queue options : flags | attributes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to 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#... <!-- required for new features -->

option for publish persistent message:
`amqp://localhost/%2f/messages?queue[attributes][delivery_mode]=2&queue[flags]=1`
or
options:
>queue:
>>name: '%env(MESSENGER_QUEUE)%'
>>routing_key: '%env(MESSENGER_ROUTING_KEY)%'
>>attributes:
>>>delivery_mode: 2

>>flags: 1

Commits
-------

5e16053 update test case for custom queue options
4532319 publish message with custom queue options : update ConnectionTest
6f9fdaf publish message with custom queue options : flags | attributes
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
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.

5 participants