NameLessMessage :- We are making snapshot subscription. So all the messages are recieved as part of "Refresh" message or "Status" message callback.
Suppose i made a batch request for "RIC1", i will receive a "Status" msg where message does not have any name and msg.hasName will be "false" followed by the expected "RefreshMsg". I am calling them nameless as they do not have name with them. This can be seen with EMA Batch example "example370_MarketPrice_Batch". Please find below code for the same where i was referring : -
public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event) { System.out.println("Item Name: " + (refreshMsg.hasName() ? refreshMsg.name() : "<not set>")); System.out.println("Service Name: " + (refreshMsg.hasServiceName() ? refreshMsg.serviceName() : "<not set>"));
System.out.println("Item State: " + refreshMsg.state());
if (DataType.DataTypes.FIELD_LIST == refreshMsg.payload().dataType()) decode(refreshMsg.payload().fieldList());
System.out.println(); }
public void onStatusMsg(StatusMsg statusMsg, OmmConsumerEvent event) { System.out.println("Item Name: " + (statusMsg.hasName() ? statusMsg.name() : "<not set>")); System.out.println("Service Name: " + (statusMsg.hasServiceName() ? statusMsg.serviceName() : "<not set>")); if (statusMsg.hasState()) System.out.println("Item State: " +statusMsg.state());
System.out.println(); }