NAME

AnyMQ::Topic::Trait::WithBacklog - AnyMQ topic trait for backlog behaviour

SYNOPSIS

  my $bus = AnyMQ->new;
  my $channel = AnyMQ::Topic->new_with_trait
     (traits => ['WithBacklog'], backlog_length => 30, bus => $bus);
  my $client = AnyMQ->new_listener($channel);

DESCRIPTION

The topic trait for AnyMQ provides backlog to a topic. newly subscribed listeners (an <AnyMQ::Queue> object) will received the last backlog_length messages published to the topic.

ATTRIBUTES

backlog_length

How many messages are to be kept for the topic.

SEE ALSO

AnyMQ AnyMQ::Topic