AWS-SQS-Simple

 view release on metacpan or  search on metacpan

lib/AWS/SQS/Simple.pm  view on Meta::CPAN


     );

$ob->create_queue( \%params_hash    ) ;

my %params_hash = (

      QUEUE_NAME              => QUEUE Name        ,

      'MessageBody'           => Message to send   , 
      'DelaySeconds'          => The number of seconds to delay a specific message , [ OPTIONAL ]

     );

$ob->send_message( \%params_hash    ) ;


my %params_hash = (

      QUEUE_NAME            => QUEUE Name        ,

    'AttributeName.n'       => The attribute you want to get. Valid values: All | SenderId | SentTimestamp | ApproximateReceiveCount | ApproximateFirstReceiveTimestamp   ,  [ OPTIONAL ]
      'MaxNumberOfMessages' => Maximum number of messages to return. Default - 1 , [ OPTIONAL ]
      'VisibilityTimeout'   => The duration in seconds that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. Default - The visibility timeout for the queue , [ OPTIONAL ]
      'WaitTimeSeconds'     => Long poll support (integer from 1 to 20 , [ OPTIONAL ]

     );

$ob->receive_message->( \%params_hash )


=head1 CONSTRUCTOR 

=head2 new

lib/AWS/SQS/Simple.pm  view on Meta::CPAN

	
This function sends a message to the queue.

Usage :

 my %params_hash = (

      QUEUE_NAME              => QUEUE Name        ,

      'MessageBody'           => Message to send   , 
      'DelaySeconds'          => The number of seconds to delay a specific message , [ OPTIONAL ]

     );

$ob->send_message->( \%params_hash )


=cut

sub send_message {

lib/AWS/SQS/Simple.pm  view on Meta::CPAN

This function returns mesaages already in the queue specified.

Usage :

 my %params_hash = (

      QUEUE_NAME            => QUEUE Name        ,

    'AttributeName.n'       => The attribute you want to get. Valid values: All | SenderId | SentTimestamp | ApproximateReceiveCount | ApproximateFirstReceiveTimestamp   ,  [ OPTIONAL ]
      'MaxNumberOfMessages' => Maximum number of messages to return. Default - 1 , [ OPTIONAL ]
      'VisibilityTimeout'   => The duration in seconds that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. Default - The visibility timeout for the queue , [ OPTIONAL ]
      'WaitTimeSeconds'     => Long poll support (integer from 1 to 20 , [ OPTIONAL ]

     );

$ob->receive_message->( \%params_hash )

=cut

sub receive_message {

lib/AWS/SQS/Simple.pm  view on Meta::CPAN

	
This function generate signature using HMACSHA256 method and version 2.

=cut

sub _generate_signatue {

    my $self   = shift ;
    my $query  = shift ;
    
    my $secret_access_key = $self->{ SECRET_ACCESS_KEY } ;

    my $digest = encode_base64( hmac_sha256($query, $secret_access_key ),'' ) ;

    return $digest ;
}

=head2 _get_signed_query
	
This function utf8 encodes and uri escapes the parameters passed to generate the signed string.

=cut



( run in 1.663 second using v1.01-cache-2.11-cpan-39bf76dae61 )