Hi
I've a problem following the UPA ValueAdd package example of consumer's rdmLoginMsgCallback() implementation. This is what written in the example:
@Override
public int rdmLoginMsgCallback(RDMLoginMsgEvent event)
{
ChannelInfo chnlInfo = (ChannelInfo)event.reactorChannel().userSpecObj();
LoginMsgType msgType = event.rdmLoginMsg().rdmMsgType();
switch (msgType)
{
case REFRESH:
System.out.println("Received Login Refresh for Username: " + ((LoginRefresh)event.rdmLoginMsg()).userName());
System.out.println(event.rdmLoginMsg().toString());
// save loginRefresh
((LoginRefresh)event.rdmLoginMsg()).copy(chnlInfo.loginRefresh);
// set login stream id in MarketPriceHandler and YieldCurveHandler
chnlInfo.marketPriceHandler.loginStreamId(event.rdmLoginMsg().streamId());
chnlInfo.yieldCurveHandler.loginStreamId(event.rdmLoginMsg().streamId());
break;
case STATUS:
LoginStatus loginStatus = (LoginStatus)event.rdmLoginMsg();
System.out.println("Received Login StatusMsg");
if (loginStatus.checkHasState())
{
System.out.println(" " + loginStatus.state());
}
break;
default:
System.out.println("Received Unhandled Login Msg Type: " + msgType);
break;
}
return ReactorCallbackReturnCodes.SUCCESS;
}
Unfortunately, this implementation causes infinite login retry attempts at a very rapid rate (i.e. no pause during each retry even we set reconnectMinDelay / reconnectMaxDelay both to 10000 ms) .
My question is, what is the proper way to implement this method if we want the consumer to not retrying login when received Login StatusMsg?
I had tried modifying the code to return ReactorCallbackReturnCodes.FAILURE in that case and it seems to work pretty well but not sure if that's a correct approach.