No announcement yet.

Message update problem

  • Filter
  • Time
  • Show
Clear All
new posts

  • Message update problem

    I recently had to define a Custom Reader based on "Vizrt.Socialize.Plugins.XML_JSON.xml" to read an xml source that had individual entries structured like this:
          <forced_home_team>Ankeny Centennial</forced_home_team>
          <updated>2017-08-25 22:18:41</updated>
    My Custom Reader looks like this:
    <Reader Name="FBCIML">
          <Parameter Mandatory="True">
            <Caption>Feed Url</Caption>
        <entry xmlns="" xmlns:media="">
          <id>CIML {forced_visit_team} vs. {forced_home_team}</id>
          <title>{forced_visit_team} vs. {forced_home_team}</title>
            <name>Channel 13 Sports</name>
                <content type="application/vnd.vizrt.payload+xml">
            <payload xmlns="">
              <field name="visitor_name">
              <field name="visitor_score">
              <field name="visitor_winflag">
              <field name="home_name">
              <field name="visitor_score">
              <field name="visitor_winflag">
              <field name="period">
          <published>{updated[viztext:replace(., " ", "T")]}-05:00</published>
    The reader worked, but I noticed that, although I had included a <RefreshRate> element to the "Response", the messages did not update, even though there was a change in the score. New messages arrived according to the "RefreshRate" schedule (in this case, every 2 minutes), but messages that were already in the queue did not update to the new values included in the feed.

    I noticed that the time stamp for all the messages is the same on every message, the last time the feed refreshed (most likely generated by the system clock).

    The only way I could get the scores to update was to uncheck “Auto-Approve”, check “Delete old messages” and then check “Auto-Approve” on the source in FeedStreamer.

    I assume there's a problem with the "<published>" element, but I really don't understand what is wrong. Is there something I’m missing?

  • #2
    OK, I now think the problem is in this line:

      <published>{updated[viztext:replace(., " ", "T")]}-05:00</published>
    I believe that "<published>" should, in fact, be "<updated>" and I made an error in syntax with the viz extension to xpath . It should read:
      <updated>{updated[vizext:replace(., " ", "T")]}-05:00</updated>


    • #3
      Not sure if FeedStreamer is supposed to work this way or not, but I found a work-around for my "update" problem:
      I added the "<updated>" time stamp to the "<id>" element:

       <id>CIML {forced_visit_team} vs. {forced_home_team} {updated[vizext:replace(., " ", "T")]}-05:00</id>
      This has the effect of adding a new message every time the score gets updated in the feed. By setting "Reflect Feed" to "On", old messages that are no longer in the feed get deleted, so I'm left with only the latest score for each game.

      Maybe this was the way I was supposed to approach the problem in the beginning, but it wasn't clear from reading the documentation.