Group
Extension

Matches 4

SQS-Worker ( J/JL/JLMARTIN/SQS-Worker-0.06.tar.gz, JLMARTIN, 2018; MetaCPAN )
SQS-Worker/lib/SQS/Worker.pm ( view source; MetaCPAN )
izing the messages that come from the
queue, SQS::Worker provides you with ways to easily consume JSON messages, for example.

It comes in the form of a Moose role that is to be composed into the end 
with the message 
	}

Composing automatic json decoding to perl data structure

	package YourWorker;
  use Moose;
	with 'SQS::Worker', 'SQS::Worker::DecodeJson';

	sub process_message {
		my ($self, $
 processed a message for $name");
	}

=head1 Bundled roles

L<SQS::Worker::DecodeJson> decodes the message body in json format and passes 

L<SQS::Worker::DecodeStorable> decodes the message body in P
SQS-Worker ( J/JL/JLMARTIN/SQS-Worker-0.06.tar.gz, JLMARTIN, 2018; MetaCPAN )
SQS-Worker/lib/SQS/Worker/Client.pm ( view source; MetaCPAN )
package SQS::Worker::Client {
  use Moose;
  use Paws;
  use JSON::MaybeXS;
  use MIME::Base64;
  use Storable qw/nfreeze/;

  has queue_url => (is => 'ro', isa => 'Str', required => 1);
  has region 
o', isa => 'Str', default => 'json');
  has _serializer => (is => 'ro', isa => 'HashRef[CodeRef]', default => sub {
    return {
      json     => sub { return encode_json \@_; },
      storable => su
SQS-Worker ( J/JL/JLMARTIN/SQS-Worker-0.06.tar.gz, JLMARTIN, 2018; MetaCPAN )
SQS-Worker/lib/SQS/Worker/SNS.pm ( view source; MetaCPAN )
  use SNS::Notification;
  use JSON::MaybeXS;

  around process_message => sub {
    my ($orig, $self, $message) = @_;

    my $body;
    eval {
      $body = decode_json($message->Body)
    };
    if
 ($@) {
      $self->log->error("Worker::SNS Error decoding JSON body in message " . $message->ReceiptHandle . ": " . $@ . " for content " . $message->Body);
      die $@;
    } else {
      die "SNS 
SQS-Worker ( J/JL/JLMARTIN/SQS-Worker-0.06.tar.gz, JLMARTIN, 2018; MetaCPAN )
SQS-Worker/lib/SQS/Worker/DecodeJson.pm ( view source; MetaCPAN )
:Worker::DecodeJson;
  use Moose::Role;
  use JSON::MaybeXS;


  around process_message => sub {
    my ($orig, $self, $message) = @_;

    my $body;
    eval {
      $body = decode_json($message->Bod
y)
    };
    if ($@) {
      $self->log->error("Error decoding JSON body in message " . $message->ReceiptHandle . ": " . $@ . " for content " . $message->Body);
      die $@;
    } else {
      if (r

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.