RmqPublishFactory
my $rmq_publish = RmqPublishFactory->new(uri => 'amqp://guest:guest@localhost/vhost?exchange=test'); $rmq_publish->('message');
https://www.rabbitmq.com/uri-spec.html
default stor
uri query param ?exchange=xxx override this attribute
?exchange=xxx
default sha
uri query param ?routing_key=xxx override this attribute
?routing_key=xxx
default 60
uri query param ?heartbeat=xxx override this attribute
?heartbeat=xxx
create new publisher (code)
create recurring mojo handler for heartbeat
for dependency use [cpanfile](cpanfile)...
for resolve dependency use [carton](https://metacpan.org/pod/Carton) (or Carmel - is more experimental)
carton install
for run test use minil test
minil test
carton exec minil test
if you don't have perl environment, is best way use docker
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton install docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton exec minil test
docker run default as root, all files which will be make in docker will be have root rights
one solution is change rights in docker
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended bash -c "carton install; chmod -R 0777 ."
or after docker command (but you must have root rights)
Copyright (C) Avast Software.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Jan Seidl <seidl@avast.com>
To install Stor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Stor
CPAN shell
perl -MCPAN -e shell install Stor
For more information on module installation, please visit the detailed CPAN module installation guide.