Skip to content

Discard Sender

The Discard sender marks a message complete without transmitting it anywhere. It has no configurable fields beyond the standard destination node options.

When to use it

  • The channel does its real work upstream. A mapping node performs a database update, a REST call, or another side effect, and the channel does not need to also forward the message to an external system. The Discard sender terminates the branch cleanly.
  • Conditional branch that intentionally goes nowhere. A condition node routes some messages to a real destination and the rest to Discard.
  • Testing. Wire a Discard sender in place of a real destination while validating upstream nodes.

Message handling

Discarded messages are not silently dropped. The sender:

  • Logs discarded at INFO level (subject to the channel's effective log level).
  • Moves the message to the channel's completion queue. The same path a successful network send would take. Per-message persistence follows the channel's persistence level. At persistence level 1 or higher, the message and its source are retained for browsing in the channel's Completed tab.

To genuinely drop a message without retaining anything, set the channel's persistence level to 0 (errors are still always persisted).