NAME
Net::Stomp::MooseHelpers::TraceOnly - role to replace the Net::Stomp connection with tracing code
VERSION
version 3.0
SYNOPSIS
package MyThing;
use Moose;with 'Net::Stomp::MooseHelpers::CanConnect';
with 'Net::Stomp::MooseHelpers::TraceOnly';
$self->trace_basedir('/tmp/stomp_dumpdir');
NOTE: a CanConnect
consuming this role will never talk to the network, and will die
if asked to receive frames.
DESCRIPTION
This module replaces the connection object provided by Net::Stomp::MooseHelpers::CanConnect so that it writes to disk every outgoing frame, without actually talking to the network. It will also die
if the connection is asked to receive frames.
The frames are written as they would be "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, every frame will generate a warning.
1;
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.