Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Transformers don't seem to be able to drop messages #93

Closed
codepope opened this issue Jul 14, 2015 · 7 comments · Fixed by #95
Closed

Transformers don't seem to be able to drop messages #93

codepope opened this issue Jul 14, 2015 · 7 comments · Fixed by #95
Assignees
Milestone

Comments

@codepope
Copy link
Contributor

In 0.0.4, passing the better Msg object - and having to return it - means you can't return false - it generates an error message.

In previous versions, returning false (or some other non map/interface type) would mean the message was dropped from the pipeline.

@jipperinbham
Copy link
Contributor

Good call, I think the best way to handle this is to create a new OpType of Noop that we can then check before sending the message downstream. Thoughts?

@codepope
Copy link
Contributor Author

Sounds good - it has to be n Noop (as d for Drop is taken by Delete :) )...

@jipperinbham
Copy link
Contributor

ha, good call, also, I'm not seeing where the codebase supported the ability to drop messages in transformer functions, can you show me an example where you had this working?

@codepope
Copy link
Contributor Author

https://www.compose.io/articles/transporter-transformers-powering-up-your-data-transfer/

Creating and Skipping and Counting... These worked with hosted transporter, but I think I need to consult with Nick on the history.

@codepope
Copy link
Contributor Author

I think we're talking effective side effect which has just iterated out, so bringing it back officially as Noop would be most excellent.

@jipperinbham
Copy link
Contributor

Looking back through the changes to transformer, the ability to skip documents was removed here, 2682b08, when we changed from msg.Document to msg.Data and the type went from map[string]interface{} to interface{}. I've added this to the next milestone release since it's more of an enhancement we want to bring back and less of a bugfix.

@jipperinbham jipperinbham added this to the v0.1.0 milestone Jul 14, 2015
@nstott
Copy link
Contributor

nstott commented Jul 14, 2015

👍 good plan

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants