Am using RFA view to request data and the response payload contains all 280 fields even when I specified only BID and ASK fields in the request.
I followed the example in BatchViewManager.java. Any idea what am doing wrong.
The other thing to bear in mind is that, even if your server supports views, there is no guarantee that it will always fulfil a View request.
If you refer to section 13.3.2 of the RFA Java Developer guide (v8.0) it states in one of the paragraphs:
...However it is up to provider to decide how to handle the View. Ideally, the provider sends responses that contain only the fields or elements specified by the View. However, if the provider cannot supply the exact set of requested fields, the provider can send back responses containing additional fields, or all fields. A request for a View is treated as a suggestion by a provider, but does not guarantee that the View will be fulfilled. As a result, the consumer can receive more fields than the view set for which it requested....
So, for example, if the server is too busy serving other users and it determines that filtering the fields for your consumer will negatively impact its ability to serve other consumers, then it will not filter the fields and send you all the fields.
One of the possible reason might be that the server you connected does not support view feature.
As the view feature requires premium license on the ADS.
It is a good idea to use view feature on API to reduce data being transferred on the network however you should also prepare your code to be able to handle unexpected fields.
Because you will never know that the server you are connecting to, whether it supports view feature or not.
The attribute,SupportViewRequests, in the login response cannot indicate if the server supports view or not. Since it is always 1 regardless view is supported by the sever or not. This is the RFAJ expected behaviour due to the Login Refactoring feature.
To verify if the server supports view, please run StarterConsumer_BatchView(RFA example application) to request specific fields to the same ADS server/service as your application.
The example command line to request RIC TRI.N for BID and ASK field from a user named pimchaya to the service API_ELEKTRON:
java com.reuters.rfa.example.omm.batchviewcons.StarterConsumer_BatchView -session myNamespace::consSession -serviceName API_ELEKTRON -user pimchaya -rdmFieldDictionary ..\etc\RDM\RDMFieldDictionary -enumType ..\etc\RDM\enumtype.def -itemName TRI.N -sendView true -viewType 1 -viewData 22,25 -sendReissue false -reissueWithPAR false -reissueWithPriority false -runTime 60
For help of StarterConsumer_BatchView, please refer to package.html in StarterConsumer_BatchView's source directory
If StarterConsumer_BatchView receives only specificed fields, ADS server supports View. Hence, you should review your application source code when it encodes an item request against StarterConsumer_BatchView's source code or section “184.108.40.206 Creating Request Message With View” of RFA Java Developers Guide.
If StarterConsumer_BatchView receives all fields, you should contact the account team to make ADS supports view.