Menu Search

use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;

use qpid_proton;

my $reply_to = "~/replies";
my $help = 0;
my $man = 0;

    "reply_to=s", \$reply_to,
    man => \$man,
    "help|?" => \$help
    ) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-exitval => 0, -verbose => 2) if $man;

# get the address to use and show help if it's missing
my $address = $ARGV[0];
pod2usage(1) if !$address;

my $messenger = new qpid::proton::Messenger();

my $message = new qpid::proton::Message();

print "Sending to: $address\n";


if($reply_to =~ /^~\//) {
    print "Waiting on returned message.\n";

    print $message->get_address . " " . $message->get_subject . "\n";



=head1 NAME

client - Proton example application for Perl.

=head1 SYNOPSIS [OPTIONS] <address> <subject>

   --reply_to - The reply to address to be used. (default: ~/replies)
   --help     - This help message.
   --man      - Show the full docementation.

=over 8

=item B<--reply_to>

Specifies the reply address to be used for responses from the server.

=item B<--help>

Prints a brief help message and exits.

=item B<--man>

Prints the man page and exits.


=head2 ADDRESS

The form an address takes is:



Download this file