-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* default value for read and write timeout at least 2x heartbeat * add facade signatures (#55) * add documentation link to readme * Feature/message headers (#60) * Added headers to ResolverContract * Apply fixes from StyleCI (#58) * add advanced and headers documentation * rename phpunit.xml to phpunit.xml.dist * add unix signals handler (#61) * add unix signals handler * Apply fixes from StyleCI (#62) * Fix closure to container * Update changelog
- Loading branch information
Showing
14 changed files
with
152 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ADVANCED USAGE | ||
## Table of Contents {docsify-ignore} | ||
1. [Introducing](#introducing) | ||
1. [Headers](#headers) | ||
|
||
## Introducing | ||
Let's see some advanced uses of Pigeon | ||
|
||
## Headers | ||
You can easily add `application_headers` to message when publishing one with `header` method | ||
|
||
```php | ||
use Pigeon; | ||
|
||
Pigeon::routing($routing) | ||
->header($key, $value); | ||
``` | ||
|
||
?> You can also pass **associative array** as value for header, it will be converted to dot notation | ||
|
||
You can also capture all message headers with the resolver in your callback with `headers` method | ||
```php | ||
use Pigeon; | ||
|
||
$callback = function ($data, $resolver) { | ||
$resolver->headers(); | ||
}; | ||
Pigeon::queue($queue) | ||
->callback($callback); | ||
``` | ||
|
||
?> If you want a specific header you can pass it key to headers and it'll return only the header you asked for | ||
|
||
!> In the opposite of publishing message, when consuming headers will not return only the **application_headers** | ||
but all AMQPMessage internal headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
* [Home](/) | ||
* [Installation](INSTALLATION.md) | ||
* [Basics](BASICS.md) | ||
* [Advanced](ADVANCED.md) | ||
* [Testing](TESTING.md) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters