Delete record on an interactive source with an OMM off-stream post (websocket)

martin.gregory
martin.gregory Newcomer
edited April 8 in WebSocket API

Hi - how do I delete a specific record using an OMM off-stream post on the ads web socket please?

I'm using a type "Update" with an Action "Delete" - I get an Ack back from the ads, but the record doesn't get deleted.

How do I remove it from cache please with a post?

If i use this

        "Message": {
"ID": 0,
"Type": "Status",
"State": {
'Stream': 'Closed',
'Data': 'Suspect',
'Code': 'None',
'Text': '***Item Deleted'
},

I get a response:

[{"ID":1,"Type":"Ack","AckID":0,"NakCode":"NoResources","Text":"A42: Status message is not supported for services which do not support posting.

Thanks

Martin

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    edited April 8

    @martin.gregory

    Thank you for reaching out to us.

    The error message indicates that the service doesn't support posting.

    A42: Status message is not supported for services which do not support posting.

    Does the interactive provider advertise the SupportOMMPost property in the login refresh?

    image.png
  • Hi - Yes it does support posting. I changed the message to be this:


    "Message": {

                "ID": 0,
                "Type": 5,
                "Key": mp_post_key,
                "Container": 1,  # 1 = Delete container type
                "Fields": {}
            },
            "Type": "Post",
            "ID": 1
        }
    

    And now I get this error:

    2025-04-08 08:35:53,597 - INFO - [{"ID":1,"Type":"Ack","AckID":0,"NakCode":"DeniedBySrc","Text":"Failed","Key":{"Service":"FPUB_QA","Name":"TEST5"}}]

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @martin.gregory

    Where did you find that the "Container": 1 is the Delete container type?

    First, I would like to clarify this usage.

    You have an interactive provider on RTDS. You can send off-stream post update messages to that interactive provider. However, you can't post a status message to delete an item.

    I tested it with the 340_MP_Posting as an interactive provider and I can use the following post message in WebSocket to send a status message.

    {
    "Ack": true,
    "ID": 1,
    "Key": {
    "Name": "TEST01",
    "Service": "DIRECT_FEED"
    },
    "Message": {
    "ID": 0,
    "State": {
    "Stream": "Closed",
    "Data": "Suspect",
    "Code": "None",
    "Text": "***Item Deleted"
    },
    "Type": "Status"
    },
    "PostID": 30,
    "Type": "Post"
    }

    The interactive provider retrieved this message.

    image.png
  • How do i send a delete for a source that does not support posting please?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @martin.gregory

    Please explain more about your usage.

    For my understanding, you have an interactive provider which doesn't support posting on RTDS and you have a consumer connecting to RTDS and consuming data from a service provided by that interactive provider.

    Typically, an interactive provider accepts items' request messages from RTDS or consumers. Then, it provides response messages back to RTDS or consumers. Consumers can send close messages to an interactive provider to unsubscribe items. This is how an interactive provider works.

    Moreover, an interactive provider can also support posting which allows consumers to contribute data to an interactive provider. However, an interactive provider must support posting and it must have a logic to handle the retrieved post messages.

  • Hi Jirapongse

    Do you have links to any documentation I can read please, regarding post types, updates, refresh, deletions etc?

    Thanks

    Martin

  • Hi - do you have an equivalent page for websocket connections please?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @martin.gregory

    I checked the Websocket documents and couldn't find it.

    The API concept guide applies to all real-time APIs.