Currently the @codec.on_event block gets called with one parameter: data, or payload.
This means the on_event block does not have access to the original event object, so it cannot do things like:
Please add the original event object as 2nd parameter, so outputs plugins can get codec support without loosing functionality.
This is not possible for codecs that operate on more than one event, for example, the compress_spooler codec.
I'm open to fixing this as it is a known issue, but I don't think the proposed solution (adding a 2nd parameter) will solve it because sometimes there is no "the" event but simply "many" events or possibly "no" events.
Thanks for the explanation.
Looking at outputs/zeromq I see you already noticed this issue:
I hope you can think of a solution.
I would also love to see this fixed due to its impact on https://logstash.jira.com/browse/LOGSTASH-1786 and as a result we are now tied to Logstash 1.2.x and won't be able to upgrade our shippers until this is resolved as we rely on the dynamic routing key functionality to push messages to the appropriate queues.
This was fixed for rabbitmq in https://github.com/logstash-plugins/logstash-output-rabbitmq/commit/def38a4bce8b26afa6c7dd2b61c71115b98a15cb
If this behaviour is missing for another plugin please open a new issue on its github repository for better visibility