Object.MessageRouter (object v0.1.0)

High-performance message routing service using GenStage for backpressure. Handles message delivery between objects with priority queuing and load balancing.

Summary

Functions

Gets performance statistics for the message router.

Routes a message through the system with priority queuing.

Starts the message router GenStage producer.

Functions

get_routing_stats()

Gets performance statistics for the message router.

Returns

Map with pending messages, delivery rate, success/failure counts

route_message(message)

Routes a message through the system with priority queuing.

Parameters

  • message: Message struct with routing information

Returns

:ok - message is queued for delivery

Examples

iex> message = %{id: "msg1", from: "obj1", to: "obj2", ...}
iex> Object.MessageRouter.route_message(message)
:ok

start_link(_)

Starts the message router GenStage producer.

Returns

{:ok, pid} on successful startup