Kamaelia docs : Kamaelia.Util.Fanout

Sending an output to many places

This component copies data sent to its inbox to multiple, specified outboxes. This allows you to 'fan out' a data source to several predetermined destinations.

Example Usage

Output data source both to a file and to the console:

Graphline( source  = MyDataSource(...),
           split   = Fanout(["toConsole","toFile"]),
           file    = SimpleFileWriter(filename="outfile"),
           console = ConsoleEchoer(),
           linkages = {
             ("source","outbox")   : ("split","inbox"),
             ("split","toConsole") : ("console","inbox"),
             ("split","toFile")    : ("file","inbox"),

How does it work?

At initialization, specify a list of names for outboxes. Once the component is activated, any data sent to its "inbox" inbox will be replicated out to the list of outboxes you specified.

In effect, data sent to the "inbox" inbox is 'fanned out' to the specified set of destinations.

Nothing is sent to the "outbox" outbox.

If a shutdownMicroprocess or producerFinished message is received on the "control" inbox, then it is sent on to the "signal" outbox and the component terminates.

There is no corresponding 'Fanout' of data flowing into the "control" inbox.


class Fanout(Axon.Component.component)

Fanout(boxnames) -> new Fanout component.

A component that copies anything received on its "inbox" inbox to the named list of outboxes.

Keyword arguments:

  • boxnames -- list of names for the outboxes any input will be fanned out to.


  • control : Shutdown signalling
  • inbox : Data to be fanned out


  • outbox : NOT USED
  • signal : Shutdown signalling

Methods defined here


You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

__init__(self, boxnames)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature


Main loop.


Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT

Kamaelia is an open source project originated from and guided by BBC Research. For more information browse the site or get in contact.

This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)

(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved.

This web site is powered by the same code created for the bicker manor project. For more details, contact Michael Sparks at BBC Research directly (cf contact)