Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Filters > Discarded Messages

Discarded Messages

The filters will either accept a message or silently discard it. However, instead of discarding unwanted messages, you may want to log them for further analysis. Ideally, such messages should be quarantined for someone (e.g., a support team) to analyze. The framework allows the filter to raise an exception or forward it to another channel when the message doesn’t fit the filter criteria.

To raise an exception, add the throw-exception-on-rejection attribute to the filter element. This is shown as highlighted code in the following snippet:

<int:filter input-channel="all-trades-in-channel"
            output-channel="cancel-trades-out-channel"
            ref="cancelTradeFilter"
            throw-exception-on-rejection="true">
</int:filter>

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint