java - How to get the current configuration of a thread pool via its HystrixThreadPoolKey? -


is there way retrieve hystrixthreadpoolproperties instance (or other property container) specific hystrixthreadpoolkey?

so default thread pool properties overlaid configuration provided executing command with:

hystrixcommand.setter.withgroupkey(<some group>)     .andthreadpoolkey(hystrixthreadpoolkey)     .andthreadpoolpropertiesdefaults(...) 

i've tried following approach:

hystrixpropertiesstrategy hystrixpropertiesstrategy = hystrixpropertiesstrategydefault.getinstance();  hystrixthreadpoolproperties hystrixthreadpoolproperties =             hystrixpropertiesstrategy.getthreadpoolproperties(hystrixthreadpoolkey, hystrixthreadpoolproperties.setter()); 

this seems recover default hystrix configuration threadpool not property changes i've made specific specific pool key corresponds to.

this case though i'm able verify thread pool indeed picking configuration when execute commands run it.

the version of hystrix using 1.5.0-rc.5, , couldn't find library allow direct retrieval of threadpool properties associated command. here have tried using java reflection:

    hystrixinvokableinfo<?> command = hystrixrequestlog.getcurrentrequest().getallexecutedcommands().iterator().next();      field field = command.getclass().getsuperclass().getsuperclass().getsuperclass().getdeclaredfield("threadpool");     field.setaccessible(true);     hystrixthreadpool threadpool = (hystrixthreadpool) field.get(command);      field field2 = hystrixthreadpool.hystrixthreadpooldefault.class.getdeclaredfield("properties");     field2.setaccessible(true);     hystrixthreadpoolproperties threadpoolproperties = (hystrixthreadpoolproperties) field2.get(threadpool); 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -