---- On Tue, 30 Sep 2014 03:00:03 +0700 Rob Miller<[email protected]> 
wrote ---- 


> 4) (based on 2) filters cannot modify processing message but only inject 
> another one 
> ? 
This is correct, and is by design. Once a message hits the router, it might be 
concurrently delivered to multiple filters and/or outputs. It would be A Bad 
Idea™ for one of these filters to mutate the message while some other execution 
thread was also accessing the message. For this reason, `write_message()` is 
not available in the sandbox we expose to SandboxFilters. SandboxDecoders are 
in play before the router, so we know we're the only one processing a 
particular message, and mutating the message is safe. 
 
Unfortunately, if you're writing filters in Go we can't prevent you from 
mutating the messages you're processing. Trust me, though, you don't want to do 
it, it's a better choice to generate new messages instead. 
 
Hope this clarifies! 
 

Thanks, Rob!
You gave excellent explanation.






_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to