core.async

Add optional default channel to 'pub'

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

If there is no subscriber for a topic the message gets silently dropped. I suggest to add an optional default channel that receives all those messages. The default channel can then be used in scenarios, where the complete set of topics might be unknown beforehand.
This functionality resembles the 'dead letter' pattern in messaging systems.

Activity

Hide
Terje Norderhaug added a comment -

I second supporting a default channel for pub. Use cases include:

1. Report missing/unsubscribed topics, aiding in development and debugging.
2. Catch messages entering before topics have been subscribed, providing a means to expose messages otherwise dropped due to late/delayed subscriptions.
3. Chain publications with different topic-fns.

Show
Terje Norderhaug added a comment - I second supporting a default channel for pub. Use cases include: 1. Report missing/unsubscribed topics, aiding in development and debugging. 2. Catch messages entering before topics have been subscribed, providing a means to expose messages otherwise dropped due to late/delayed subscriptions. 3. Chain publications with different topic-fns.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: