Skip to content
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

Headers exchange - php example #554

Closed
Valantir007 opened this issue Mar 21, 2018 · 4 comments
Closed

Headers exchange - php example #554

Valantir007 opened this issue Mar 21, 2018 · 4 comments
Assignees

Comments

@Valantir007
Copy link

Hi,
I have a problem with headers exchange.
I wrote sender with this code:

sender

and receiver with this one:

receiver

I read documentation and I don't know why exchange_declare has second parameter "topic" but not "headers".
The documentation says that the "routing key" is skipped and only the headers are taken into account. In sender script is variable "routingKey"... but why? So the routing key is required or not...?

I set header "x-match" = 'any' and "test" = "test" in sender script but where I need to set "test" header in receiver?
Maybe I don't understand correctly how header exchange works so please help me to understand.

@Zaporozhec7
Copy link

Anyone can help with this? I have same problem to find correct way tou use "headers" exchange type. Nowhere I have found complete example. Examples here, in files "amqp_message_headers_snd.php" and "amqp_message_headers_recv.php" seems to be absolutelly incorrect, because, as suggested @Valantir007 - there used wrong exchange type. Also I do not see there any code that can be considered as filtering by headers in receiver file

@lukebakken lukebakken added this to the 2.8.0 milestone Oct 9, 2018
@lukebakken lukebakken self-assigned this Oct 9, 2018
@lukebakken lukebakken removed this from the 2.8.0 milestone Oct 23, 2018
@lukebakken lukebakken added this to the 2.9.0 milestone Feb 19, 2019
@lukebakken lukebakken removed this from the 2.9.0 milestone Mar 14, 2019
@ramunasd
Copy link
Member

Hi @Valantir007 @Zaporozhec7 You can find working example in #735

@ramunasd
Copy link
Member

fixed by #735

@Valantir007
Copy link
Author

Really thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants