Another option would be to introduce another Fiber that simply pipes
the messages to the potentially slow consumer. In the event of a
runtime exception, it could publish this back to the producer. The
producer wouldn't get synchronous feedback, but it would be informed
soon enough. Most slow consumer problems can be solved this way.
The channel could also be dropped in favor of directly pushing
Runnables into the Fiber queues. This would allow the publisher to
know if any consumer is not keeping up and still publish to all
consumers. This might be the best option. As you already observed,
you could modify the channel implementation or provide an entirely
different Channel interface that allows the publisher to be made aware
of publish failures.
I think I would go with a new channel interface that provides feedback
to the publisher.
Runnable onPublishFailure = ...action to take on publish failure.
MyChannel channel = .. custom channel
MyMsg msg = .. msg to publish
channel.publish(msg, onPublishFailure);
Hope that helps,
Mike
> --
> You received this message because you are subscribed to the Google Groups "jetlang-dev" group.
> To post to this group, send email to jetla...@googlegroups.com.
> To unsubscribe from this group, send email to jetlang-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jetlang-dev?hl=en.
>
>