question

Upvotes
Accepted
1 1 0 5

OMM Post message A29 post message did not contain permission data

Hi,

I am trying to contribute to a RIC that has the PERM_CODE FID. I am creating a Post message with 2 Fields encoded, 1 fr the permission FID with the code and 2nd for the price FID i want to update. However I keep getting this error

Message ID 4.0 received NACK : A29: Post message did not contain permission data.

I am sure my postMsg with multiple FID update works because I tried it on another RIC which does not require the permission code.

Any pointers here will be very helpful!

Thanks.

OMMEncoder encoder = publisherPool.acquireEncoder();
    OMMMsg ricPubMsg = publisherPool.acquireMsg();
    
    ricPubMsg.setMsgType(OMMMsg.MsgType.POST);
    ricPubMsg.setId(id);
    ricPubMsg.setMsgModelType(RDMMsgTypes.MARKET_PRICE);
    ricPubMsg.setPriority((byte) 1, 1);

    // A single-part post message that needs init, complete and ack indications.
    int indicationFlags = OMMMsg.Indication.POST_COMPLETE | OMMMsg.Indication.POST_INIT | OMMMsg.Indication.NEED_ACK;
    ricPubMsg.setIndicationFlags(indicationFlags);
    ricPubMsg.setAttribInfo(key.serviceName, key.ric, RDMInstrument.NameType.RIC);
    encoder.initialize(OMMTypes.MSG, 1000); 
    encoder.encodeMsgInit(ricPubMsg, OMMTypes.NO_DATA, OMMTypes.FIELD_LIST);
    encoder.encodeFieldListInit(OMMFieldList.HAS_STANDARD_DATA | OMMFieldList.HAS_INFO, (short) 1, (short) 0, (short) 2);
    int count = 0;
    for(RField fid : key.fids) {
        FidDef fidDef = dictionary.getFidDef(fid.id);
        short fidType = fidDef.getOMMType();
        encoder.encodeFieldEntryInit(fidDef.getFieldId(), fidType);
        String rep;
        Object value = values.get(count);
        if(value == null){
            rep = "";
        }else{
            Class<?> valueClass = value.getClass();
            if (fidType == OMMTypes.UINT) {
                encoder.encodeUInt(Long.parseLong(value.toString()));
            } else {
                if(Float.class.equals(valueClass) || Double.class.equals(valueClass)){
                    rep = DECIMAL_FORMAT.format(value);
                }else{
                    rep = value.toString();

                }
                encoder.encodeString(rep, fidType);
            }
        }
        count++;
    }
    encoder.encodeAggregateComplete();
    OMMMsg pubMsg = (OMMMsg) encoder.getEncodedObject();

treprfarfa-apipost
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@ganesh.shivshankar

I found the description of this error message in the ADS installation guide.

You can also refer to the following questions:

You may directly contact the ADS support team via MyRefinitiv for more information.



1601276632828.png (53.1 KiB)
1601276899723.png (16.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea