Skip navigation links

Package org.arl.fjage.observer

A message observer for debugging fjåge applications.

See: Description

Package org.arl.fjage.observer Description

A message observer for debugging fjåge applications.

fjåge offers no direct way to watch agents talk to each other. Logs show what each agent chose to log, and a shell sees only the messages addressed to it. Observer fills that gap: added to a container, it observes every message sent in that container and publishes it to a web interface that draws the traffic as a sequence diagram.

 container.add("observer", new Observer());
 
The web interface is served by the application's own web server if it has one, and on Observer.DEFAULT_PORT otherwise. The URL is logged at startup, and readable as the agent's url parameter.

An observer sees only its own container. Messages exchanged between two agents inside a slave container never reach the master, so an observer on the master cannot see them. In a distributed setup, add one observer per container.

Observation is transparent: the listener never consumes a message and never throws, so agents behave exactly as they would without it. What the observer reports is messages sent — it runs before delivery is attempted, and so cannot say whether a message was delivered. A message published to a topic appears once, addressed to that topic, not once per subscriber.

In the web interface, choosing which endpoints to show is local to the browser and retrospective, revealing messages already buffered there. Choosing to drop an endpoint, or excluding message classes by regular expression, is applied in the container, before serialization: those messages are never sent to any browser, and undoing the rule does not bring them back.

Skip navigation links