« Index of all namespaces of this project
Utility functions shared by multiple API router implementations.
(apply-router! source-channel router)
Given a core.async channel that produces API messages, passes them to the given IAPIRouter as they arrive. TODO: Concurrency
(try-handler f message)
Given a function and an API message, runs the function with the message payload as its argument. If the message defines a :reply-to address and the handler returns a truthy value, replies to the :reply-to address with the result. :correlation-id will be set if given in the incoming message. If there are any errors, logs them and attempts to put the message on the DLQ.
(try-to-process-message component message)
Shared implementation for IAPIRouter's process-message! call. Tries to look up the appropriate handler using handler-for-call. If found, runs the handler.