I would have used a router instead of a filter for the decision of 'delete' filter vs. output all, e.g.:

```
<int:router input-channel="to.discardDeletes" expression="${discardDeletes:true} ? 'to.filter' : 'output'"/>
```