On Wed, 2020-01-01 at 12:03 -0800, Ryan Schmitt wrote:
> I suppose this is as good a time as any to ask: why do single-core
> IOReactors support the Exception callback (for error logging), but
> not
> multi-core IOReactors?

MultiCoreIOReactor is nothing more than a collection of
SingleCoreIOReactor instances. They all share the same exception
callback

https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/reactor/DefaultListeningIOReactor.java#L89


>  Also, how should this callback be configured when
> creating a client? (I wasn't able to immediately find the relevant
> config
> method to call.)
> 

At the moment HttpAsyncClientBuilder always uses the same 
LoggingExceptionCallback instance that simply logs exceptions with
ERROR priority

https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java#L929
https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/LoggingExceptionCallback.java

If you like this can be made more customisable.

Does that clarify things a bit?

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to