question

Upvote
Accepted
16 0 1 3

NULL fields on MarketDataItemCont

Hi

I am looking at some legacy internal Java RFA libraries. They send a MarketDataItemCont object. But set the following for all messages

marketDataItemContributor.setSubject(null);
marketDataItemContributor.setItemName(null);
marketDataItemContributor.setServiceName(null);

Is this even valid? Where is the RIC, to identify each record...?

treprfarfa-apijava
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
Accepted
86.2k 292 53 79

The application should call MarketDataItemCont.setSubject(...) with four part subject name, such as "DCS_MARKETLINK.ANY.LRTOX1=R.NaE". Alternatively an application can set a service name and an item name.

The example in MDContribDemo.java uses setSubject() or setItemName() and setSubject().

    protected void sendMessages()
    {
        if (!_subjects.isEmpty())
        {
            Iterator<String> iter = _subjects.iterator();
            while (iter.hasNext())
            {
                String subject = iter.next();
                _contrib.setSubject(subject);
                _contrib.setItemName(null);
                _contrib.setServiceName(null);
                _formatter.setSubjectName(subject);
                _contrib.setBuffer(updateFields());
                _contributor.contribute(_contrib);
            }
        }


        if ((_svcName != "") || !_items.isEmpty())
        {
            Iterator<String> iter = _items.iterator();
            _contrib.setServiceName(_svcName);
            while (iter.hasNext())
            {
                String item = iter.next();
                _contrib.setSubject(null);
                _contrib.setItemName(item);
                _formatter.setItemName(item);
                _contrib.setBuffer(updateFields());
                _contributor.contribute(_contrib);
            }
        }
    }
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.2k 24 31 45

The conventional contribution mechanism is to subscribe to the item stream and issue the SSL insert or RSSL post using the token from the subscription. When this is so the subscription meta-data is not required in the contribution message.

RSSL introduces "offstream posting", whereby you can send the contribution on the login token and that does require setting the message meta-data.

For further information please consulting §13.6 Posting of the RFA Java Development guide.

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.