Closed mtkp closed 7 years ago
I like the middleware approach. I think the timing middleware might be a little misleading though – if the caller is using squeedo as-advertised (in particular, writing to the done-channel in the callback to an async-IO request), using the wrap-time-logger middleware will log the time until that request was kicked off (not the total processing time for the message). In that case, the right place to measure latency is when the message is pulled back off the done-chan.
It's a useful middleware if the message processing is fully synchronous, but I worry if it's included in the lib that it won't do exactly what users think.
thats a good point. i'll remove the timing middleware.
deserialization and timing middleware