Created
August 12, 2010 11:46
-
-
Save hintjens/520825 to your computer and use it in GitHub Desktop.
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
You will need to patch base2/asl/pal/asl_pal_stdc.gsl: | |
ipr_process_wait (process, TRUE); | |
> rc = ipr_process_exitcode (process); | |
ipr_process_destroy (&process); | |
Run 'boom install' in base2/asl and 'boom build install' in openamq/common in order to get working PAL. |
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
<?xml?> | |
<!-- Client side --> | |
<!-- Reads messages slowly from amq.direct with routing key "test" --> | |
<pal script = "amq_pal_gen"> | |
<session direct = "1"> | |
<queue_declare exclusive = "1" /> | |
<queue_bind exchange = "amq.direct" routing_key = "test" /> | |
<basic_consume no_ack = "1" exclusive = "1" /> | |
<repeat> | |
<!-- Wait for and discard a message --> | |
<wait /> | |
<basic_arrived> | |
<echo>Have message...</echo> | |
</basic_arrived> | |
<!-- Sleep for 1 second --> | |
<basic_content exec="sleep 1" /> | |
</repeat> | |
</session> | |
</pal> |
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
<?xml?> | |
<!-- Server side --> | |
<!-- Sends messages at full speed to amq.direct with routing key "test" --> | |
<pal script = "amq_pal_gen"> | |
<session> | |
<repeat> | |
<basic_content size = "1000" /> | |
<basic_publish exchange = "amq.direct" routing_key = "test" /> | |
</repeat> | |
</session> | |
</pal> |
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
Demonstrating WireAPI overflow in direct mode. | |
Window 1 | |
amq_server --direct 1 | |
Window 2 | |
server | |
Window 3 | |
client | |
Window 4 | |
top | |
We see memory of client process increase without limit. Whereas the high-water mark is set to 500 messages. |
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
<?xml?> | |
<config> | |
<echo>Configuring client</echo> | |
<tuning | |
low_water = "200" | |
high_water = "500" | |
direct = "1" | |
/> | |
<direct | |
batching = "32768" | |
on_overflow = "trim" | |
/> | |
</config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment