The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XAS::Spooler::Connector - Perl extension for the XAS environment

SYNOPSIS

  use XAS::Spooler::Connector;

  my $connection = XAS::Spooler::Connector->new(
      -alias           => 'connector',
      -host            => $hostname,
      -port            => $port,
      -retry_reconnect => TRUE,
      -tcp_keepalive   => TRUE,
      -hostname        => $env->host,
  );

DESCRIPTION

This module connects to a message queue server for spoolers. All of the spool processors funnel messages thru this module. If the connection is lost to the server, it signals the processor to stop processing until it is able to reconnect to the server.

METHODS

new

This method inherits from XAS::Lib::Stomp::POE::Client and takes these additional parameters:

-hostname

An optional name for the host that is processing these spool files.

PUBLIC EVENTS

connection_down(OBJECT)

This event broadcasts that the connection had been dropped.

OBJECT

The handle for the current self.

connection_up(OBJECT)

This event broadcasts when the connection is established.

OBJECT

The handle for the current self.

send_packet(OBJECT,ARG0, ARG1, ARG2, ARG3, ARG4)

Process the data received from the processors. This processing includes creating the standard message header, decoding the data and creating a serialized message using JSON. This message is then sent to message queue server.

OBJECT

The handle for the current self.

ARG0

The alias of the processor.

ARG1

The type of data.

ARG2

The queue to send the message too.

ARG3

The actual data to process. This is usually a JSON formated string.

ARG4

The full qualified name of the file that was processed. This, along with the processor alias, is used for the STOMP receipt.

SEE ALSO

XAS::Spooler::Processor
XAS::Spooler
XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (c) 2012-2015 Kevin L. Esteb

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.