NAME

Net::Stomp::MooseHelpers::TraceStomp - role to wrap the Net::Stomp connection in tracing code

VERSION

version 2.9

SYNOPSIS

package MyThing;
use Moose;with 'Net::Stomp::MooseHelpers::CanConnect';
with 'Net::Stomp::MooseHelpers::TraceStomp';

$self->trace_basedir('/tmp/stomp_dumpdir');
$self->trace(1);

DESCRIPTION

This module wraps the connection object provided by Net::Stomp::MooseHelpers::CanConnect and writes to disk every outgoing and incoming frame.

The frames are written as they are "on the wire" (no encoding conversion happens), one file per frame. Each frame is written into a directory under "trace_basedir" with a name derived from the frame destination.

ATTRIBUTES

trace_basedir

The directory under which frames will be dumped. Accepts strings and Path::Class::Dir objects. If it's not specified and you enable "trace", every frame will generate a warning.

trace

Boolean attribute to enable or disable tracing / dumping of frames. If you enable tracing but don't set "trace_basedir", every frame will generate a warning.

AUTHOR

Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Net-a-porter.com.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.