Pal Examples

Overview

This package provides a bunch of PAL scripts that demonstrate basic PAL functionality, as well as various ways of using AMQP. To build these scripts, you need to have OpenAMQ installed, then you use the command:

pal scriptname

To generate a C program from the PAL script and compile it. Here is one example from the package:

<?xml?>
<pal script = "amq_pal_gen">
    This script sends a large number of messages to a queue and then
    reads them back.  The number of messages can be specified on the
    command-line.

    <session exchange = "myexchange" queue = "myqueue" >
        <set name = "number-of-messages" cmdline = "N" value = "1000" />
        <set name = "message-size" cmdline = "S" value = "1000" />
        <exchange_declare type = "fanout" />
        <queue_declare />
        <queue_bind />
        <repeat times = "$number-of-messages" counter = "index" progress = "100">
            <basic_content size = "$message-size" message_id = "id-$index" />
            <basic_publish routing_key = "myqueue" />
        </repeat>
        <while name = "arrived" test = "lt" value = "$number-of-messages" progress = "100">
            <basic_get />
            <basic_arrived>
                <inc name = "arrived" />
            </basic_arrived>
        </while>
    </session>
</pal>

License

These scripts are placed into the public domain and may be used for any purpose whatsoever without any attribution. We encourage you to submit interesting PAL scripts to the openamq-dev list.

Support

For all questions please email the openamq-dev list.

Download

Comments

martin_sustrikmartin_sustrik 1176732562|%e %b %Y, %H:%M %Z|agohover

These examples cannot be compiled and used with 1.2c1 version of OpenAMQ unfortunately. We will work on releasing new version shortly.

Sorry for unconvenience.

unfold by martin_sustrikmartin_sustrik, 1176732562|%e %b %Y, %H:%M %Z|agohover
Segmentation fault
carlskiicarlskii 1209311214|%e %b %Y, %H:%M %Z|agohover

Hi I'm trying to run the imsend.pal script against the latest release of OpenAMQ but get segmentation error when I try to send the message:

cbourne@ubuntu:~/palscripts$ ./palsend

Segmentation fault

Is this is a bug?

Regards,

Carl

unfold Segmentation fault by carlskiicarlskii, 1209311214|%e %b %Y, %H:%M %Z|agohover
Add a new comment
rating: +2+x