Attempt 1 - QoS
I noticed in the API that there is setQos and setQosReq methods in OMMMsg, however when I set that value it doesn't seem to do anything (i.e. its never transmitted to the provider). I tried running the provider in the demo where it logs out the message and it was always set to QoS of realtime, tick by tick.
Looking further into it, the interactive provider (com.reuters.rfa.example.omm.prov.StartedProvider_Interactive) sets an array of QoS in the directory that is returned to the consumer. The QoS always equalled the first element of that array no matter what I set it to or what I requested in the OMMMsg. I also noticed that if I returned an empty array as part of the directory then it would set no QoS. I feel like I must be doing something wrong.
Note that I want to be able to set the QoS as we have 2 sets of instruments one that needs to be updated in real time and the other (very large set) that needs to be updated every few seconds, so I want to be able to set different QoS for different instruments.
I am using RFA Java 8.0.1
EDIT - Attempt 2 - Pause & Resume
So after the feedback from the responses to the first question to say that QoS is not possible, I am attempting to use the pause and resume feature so that I pause the stream at regular intervals then resume for a short period and pause it again. However when I set the indication on the consumer of PAUSE_REQ it does not get sent to the provider either.
EDIT2 - Seems pause/resume is not supported on the server I'm running otherwise it would work.
End Edit - note below is from the original - its just not possible to add lines after a code block for some reason in this editor...
Here is some sample code for the QoS request that is being sent:
private Handle register(Client client, EventQueue queue, String serviceName, String itemName, boolean streaming, short msgModelType, byte priorityClass,
int priorityCount) {
OMMMsg msg = this._pool.acquireMsg();
msg.setMsgType(OMMMsg.MsgType.REQUEST);
if (!streaming) {
msg.setIndicationFlags(OMMMsg.Indication.NONSTREAMING | OMMMsg.Indication.REFRESH);
} else {
msg.setIndicationFlags(OMMMsg.Indication.REFRESH);
}
// TODO Qos seems to be ignored by the RFA.. it reads the first entry
// in the directory for the service.
// It is saved in RDMServiceInfo but can't figure out how to retrieve
// it and modify it on the fly...
msg.setQos(OMMQos.QOS_REALTIME_JIT);
// msg.setQos(0, this._intervalRate);
msg.setMsgModelType(msgModelType);
msg.setAttribInfo(serviceName, itemName, RDMInstrument.NameType.RIC);
if (priorityClass + priorityCount > 0) {
msg.setPriority(priorityClass, priorityCount);
}
this._spec.setMsg(msg);
Handle handle = this._ommConsumer.registerClient(queue, this._spec, client, null);
this._pool.releaseMsg(msg);
return handle;
}