question

Upvotes
Accepted
1 0 0 2

Nack / [500]: Unknown Item: [MYRIC]

I'm trying to publish some items on an internal channel, my code looks like this


UpdateMsg nestedUpdateMsg = EmaFactory.createUpdateMsg()
        .streamId(_postStreamID)
        .name(ric)
        .payload(nestedFieldList);

PostMsg postMsg = EmaFactory.createPostMsg()
        .postId(_postID++)
        .serviceName(serviceName)
        .name(ric)
        .solicitAck(true)
        .payload(nestedUpdateMsg)
        .complete(true);

And in response I get a Nack

Received AckMsg. Item Handle: 1 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@41545752 ackMesgAckMsg
    streamId="1"
    domain="MarketPrice Domain"
    ackId="1077"
    nackCode="DeniedBySource"
    text="[500]: Unknown Item: TESTABC794481179="
    name="TESTABC94481179="
    nameType="1"
    serviceId="431"
AckMsgEnd


elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apidenied-by-src
icon clock
10 |1500

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

@robert.coles

Thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply that best answers your question. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Upvotes
Accepted
9.6k 10 7 7

Hello @robert.coles

I sent the same post message as you to the infrastructure which has ATS version 1.4.3.L1:

<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/127.0.0.1:57408 remote=localhost/127.0.0.1:1116] -->
<!-- Fri Jul 31 10:21:57 ICT 2020 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<POST domainType="MARKET_PRICE" streamId="1" containerType="MSG" flags="0x66 (HAS_POST_ID|HAS_MSG_KEY|POST_COMPLETE|ACK)" postId="3" postUserId="69984" postUserAddr="10.158.51.116" dataSize="114">
    <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="267" name="ATS_INSERT_S"/>
    <dataBody>
        <REFRESH domainType="MARKET_PRICE" streamId="0" containerType="FIELD_LIST" flags="0x00" groupId="0" State: Open/Ok/None - text: "" dataSize="98">
            <dataBody>
                <fieldList flags="0x08 (HAS_STANDARD_DATA)">
                    <fieldEntry fieldId="-1" data="5453 5455 5331 3131 3335 4632 3030 323D"/>
                    <fieldEntry fieldId="22" data="0A11 502C"/>
                    <fieldEntry fieldId="25" data="0A11 59F0"/>
                    <fieldEntry fieldId="6" data="0A11 550E"/>
                    <fieldEntry fieldId="873" data="0E01 3F"/>
                    <fieldEntry fieldId="1489" data="0E01 00"/>
                    <fieldEntry fieldId="996" data="0E01 18"/>
                    <fieldEntry fieldId="1029" data="0E01 42"/>
                    <fieldEntry fieldId="1029" data="0E01 42"/>
                    <fieldEntry fieldId="332" data="0E64"/>
                    <fieldEntry fieldId="886" data="0E26"/>
                    <fieldEntry fieldId="1052" data="6C61 6D62 6C69 7A"/>
                    <fieldEntry fieldId="1687" data="0E00"/>
                </fieldList>
            </dataBody>
        </REFRESH>
    </dataBody>
</POST>

The RIC could be created successfully. I got:

Received AckMsg. Item Handle: 1 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@7254ddcc
Item Name: ATS_INSERT_S
Service Name: not set
Ack Id: 3
Text: [4]: Creation Accepted

The same post message works on my ATS but does not work on your ATS. Hence, your ATS should be investigated why it sends nacked with "Denied By Source".

You can reach out to ATS support team who can help you to investigate ATS via Product Support | MyRefinitiv and select Product to be Advanced Transformation System (ATS) .

icon clock
10 |1500

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

Upvotes
24.6k 54 17 14

Hello @robert.coles

Does the item TESTABC794481179= exist in your environment? Are you contributing data to your internal TREP or ATS server?

icon clock
10 |1500

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

It does not exist, my goal is to create it dynamically.If I do use an older RIC that we created via the SFR library it does seem to take the update, but if I use a new RIC I get this error.

Upvotes
9.6k 10 7 7

Hello @robert.coles

The application can receive "[500]: Unknown Item" when the application publishes data of a RIC which does not exist on ATS. Hence, please make sure that TESTABC794481179= is a correct RIC that you would like to publish. If so, you should contact the ATS admin who can create a RIC on ATS. Moreover, you can create the RIC on ATS using EMA application as well. For more details, please refer to the following articles:

Implementing Elektron API applications to work with ATS - Part 1

Implementing Elektron API applications to work with ATS - Part 2

icon clock
10 |1500

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

This is on an internal distribution channel which will have some older SSL subscribers, The RIC does not exist already, The intention is to create the RIC if it does not exist. I'd like to create new RICs dynamically from the applicaiton.

Upvotes
9.6k 10 7 7

Hello @robert.coles

Does your system like below?

EMA application -> TREP(ADS and ADH) -> ATS

If so, you can refer to Sample Posting with Adding RIC and Fields section in Implementing Elektron API applications to work with ATS - Part 1 which show how to create a new RIC from EMA application

icon clock
10 |1500

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

Upvotes
1 0 0 2

Thanks, so looking at the example, . so if my infrastructure is " EMA application -> TREP -> ATS"

then if I get this NACK publishing an update, I can assume the RIC needs to be created and then post to name( "ATS_INSERT_S" ) an initial message to "create" the RIC ?

icon clock
10 |1500

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

Hello @robert.coles

Yes. That's right.

Upvotes
1 0 0 2

So my createRIC "ATS_INSERT_S" message is nacked with "Denied By Source" too.. The dictionary does have -1 "RIC_NAME" and RSSL is enabled..


ackMesgAckMsg
streamId="1"
domain="MarketPrice Domain"
ackId="2"
nackCode="DeniedBySource"
text="[500]: Unknown Item: ATS_INSERT_S"
name="ATS_INSERT_S"
nameType="1"
serviceId="431"

This is my function:


int pid = Kernel32.INSTANCE.GetCurrentProcessId();
long ip=0L;
try(final DatagramSocket socket = new DatagramSocket()){
socket.connect(InetAddress.getByName("8.8.8.8"), 10002);
for (byte part : socket.getLocalAddress().getAddress()){
ip = ip *256;
ip = ip + Byte.toUnsignedInt(part);
}
} catch (Exception e) {
logger.warn("problem finding host ip ",e);
}
RefreshMsg nestedRefreshMsg = EmaFactory.createRefreshMsg().domainType(DomainTypes.MARKET_PRICE);
FieldList nestedFieldList = EmaFactory.createFieldList();
nestedFieldList.add(EmaFactory.createFieldEntry().ascii(-1, ric));
nestedFieldList = createPayLoad(td,nestedFieldList);
nestedRefreshMsg.payload(nestedFieldList );

//.serviceName(serviceName)
//.serviceName(serviceName)
PostMsg postMsg = EmaFactory.createPostMsg()
.postId(_postID++)
.serviceId(serviceID)
.name(ATS_INSERT_S)
.solicitAck(true)
.payload(nestedRefreshMsg)
.publisherId(pid,ip)
.complete(true);

// .publisherId()

_ommConsumer.submit(postMsg, _streamHandle);
icon clock
10 |1500

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

Upvotes
9.6k 10 7 7

Hello @robert.coles

Based on your given source code, I sent a Post message below:

<POST domainType="MARKET_PRICE" streamId="1" containerType="MSG" flags="0x66 (HAS_POST_ID|HAS_MSG_KEY|POST_COMPLETE|ACK)" postId="2" postUserId="24424" postUserAddr="10.46.226.31" dataSize="36">
    <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="267" name="ATS_INSERT_S"/>
    <dataBody>
        <REFRESH domainType="MARKET_PRICE" streamId="0" containerType="FIELD_LIST" flags="0x00" groupId="0" State: Open/Ok/None - text: "" dataSize="20">
            <dataBody>
                <fieldList flags="0x08 (HAS_STANDARD_DATA)">
                    <fieldEntry fieldId="-1" data="4331 2E4E"/>
                    <fieldEntry fieldId="22" data="0F0C"/>
                    <fieldEntry fieldId="25" data="0F0F"/>
                </fieldList>
            </dataBody>
        </REFRESH>
    </dataBody>
</POST>

Then, I got an ack message indicating that the RIC was created successfully.

Received AckMsg. Item Handle: 1 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@47c063ba
Item Name: ATS_INSERT_S
Service Name: not set
Ack Id: 2
Text: [4]: Creation Accepted

Could you share the post message which is sent then you get nacked with "Denied By Source" back?

You can see the sent/received messages by enabling EMA trace log, set XmlTraceToStdout in EmaConfig.xml to 1. For example:

<Consumer>
    <Name value="Consumer_1"/>
    <Channel value="Channel_1"/>
    ...
    <XmlTraceToStdout value="1"/>
</Consumer>
icon clock
10 |1500

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

Upvotes
9.6k 10 7 7

Hello @robert.coles

Please make sure that dictionary does have "X_RIC_NAME" not "RIC_NAME" like below:

X_RIC_NAME "RIC NAME"   -1  NULL        ALPHANUMERIC       32  RMTES_STRING    32 
icon clock
10 |1500

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

Confirmed it is in the dictionary as above.

Upvotes
1 0 0 2

My failing insert in XML is

<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/10.158.51.116:64201 remote=nygmdu203-c.us.db.com/10.212.15.129:14002] -->
<!-- Thu Jul 30 14:23:29 EDT 2020 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<POST domainType="MARKET_PRICE" streamId="1" containerType="MSG" flags="0x66 (HAS_POST_ID|HAS_MSG_KEY|POST_COMPLETE|ACK)" postId="3" postUserId="69984" postUserAddr="10.158.51.116" dataSize="114">
    <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="431" name="ATS_INSERT_S"/>
    <dataBody>
        <REFRESH domainType="MARKET_PRICE" streamId="0" containerType="FIELD_LIST" flags="0x00" groupId="0" State: Open/Ok/None - text: "" dataSize="98">
            <dataBody>
                <fieldList flags="0x08 (HAS_STANDARD_DATA)">
                    <fieldEntry fieldId="-1" data="5453 5455 5331 3131 3335 4632 3030 323D"/>
                    <fieldEntry fieldId="22" data="0A11 502C"/>
                    <fieldEntry fieldId="25" data="0A11 59F0"/>
                    <fieldEntry fieldId="6" data="0A11 550E"/>
                    <fieldEntry fieldId="873" data="0E01 3F"/>
                    <fieldEntry fieldId="1489" data="0E01 00"/>
                    <fieldEntry fieldId="996" data="0E01 18"/>
                    <fieldEntry fieldId="1029" data="0E01 42"/>
                    <fieldEntry fieldId="1029" data="0E01 42"/>
                    <fieldEntry fieldId="332" data="0E64"/>
                    <fieldEntry fieldId="886" data="0E26"/>
                    <fieldEntry fieldId="1052" data="6C61 6D62 6C69 7A"/>
                    <fieldEntry fieldId="1687" data="0E00"/>
                </fieldList>
            </dataBody>
        </REFRESH>
    </dataBody>
</POST>
icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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