@ Override public void setAsynchConsumerCallback ( int requestNumber , int maxActiveMessages , long messageLockExpiry , int batchsize , OrderingContext orderContext , boolean stoppable , int maxSequentialFailures , long hiddenMessageDelay ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setAsynchConsumerCallback" , new Object [ ] { requestNumber , maxActiveMessages , messageLockExpiry , batchsize , orderContext , stoppable , maxSequentialFailures , hiddenMessageDelay } ) ; try { // Here we need to examine the config parameter that will denote whether we are telling // MP to inline our async callbacks or not. We will default to false, but this can // be overrideen. boolean inlineCallbacks = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . INLINE_ASYNC_CBACKS_KEY , CommsConstants . INLINE_ASYNC_CBACKS ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Inline async callbacks: " + inlineCallbacks ) ; MPConsumerSession session = ( MPConsumerSession ) getConsumerSession ( ) ; if ( stoppable ) { session . registerStoppableAsynchConsumerCallback ( this , maxActiveMessages , messageLockExpiry , batchsize , getUnrecoverableReliability ( ) , inlineCallbacks , orderContext , maxSequentialFailures , hiddenMessageDelay ) ; } else { session . registerAsynchConsumerCallback ( this , maxActiveMessages , messageLockExpiry , batchsize , getUnrecoverableReliability ( ) , inlineCallbacks , orderContext ) ; } try { getConversation ( ) . send ( poolManager . allocate ( ) , JFapChannelConstants . SEG_REGISTER_ASYNC_CONSUMER_R , requestNumber , JFapChannelConstants . PRIORITY_MEDIUM , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".setAsynchConsumerCallback" , CommsConstants . CATASYNCHCONSUMER_SETCALLBACK_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , e . getMessage ( ) , e ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2017" , e ) ; } // End d175222 } catch ( SIException e ) { //No FFDC code needed //Only FFDC if we haven't received a meTerminated event. if ( ! ( ( ConversationState ) getConversation ( ) . getAttachment ( ) ) . hasMETerminated ( ) ) { FFDCFilter . processException ( e , CLASS_NAME + ".setAsynchConsumerCallback" , CommsConstants . CATASYNCHCONSUMER_SETCALLBACK_02 , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . CATASYNCHCONSUMER_SETCALLBACK_02 , getConversation ( ) , requestNumber ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setAsynchConsumerCallback" ) ; }
Creates a normal or stoppable async consumer for this session . This is called in response to the request from a client . This differs from readahead or synchronous sessions where an async callback is registered without the client knowing .