From 7ed6c6461610f669fcafe9c9dd54effca5e4ac3b Mon Sep 17 00:00:00 2001 From: Andrei Kurilov <18027129+akurilov@users.noreply.github.com> Date: Fri, 13 Oct 2023 10:12:34 +0300 Subject: [PATCH] set the item id to the subject attribute --- README.md | 1 - config/config.go | 1 - converter/converter.go | 2 +- helm/producer-rss/values.yaml | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index f07e1d0..33749ed 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,6 @@ The service is configurable using the environment variables: | MSG_MD_KEY_FEED_TITLE | `feedtitle` | Cloud Event attribute name to use for the feed title | | MSG_MD_KEY_AUTHOR | `author` | Cloud Event attribute name to use for the RSS item author | | MSG_MD_KEY_CATEGORIES | `categories` | Cloud Event attribute name to use for the RSS item categories | -| MSG_MD_KEY_GUID | `rssitemguid` | Cloud Event attribute name to use for the RSS item GUID | | MSG_MD_KEY_IMAGE_TITLE | `imagetitle` | Cloud Event attribute name to use for the RSS item image title | | MSG_MD_KEY_IMAGE_URL | `imageurl` | Cloud Event attribute name to use for the RSS item image URL | | MSG_MD_KEY_TITLE | `title` | Cloud Event attribute name to use for the RSS item title | diff --git a/config/config.go b/config/config.go index 44945bf..ae59ed1 100644 --- a/config/config.go +++ b/config/config.go @@ -59,7 +59,6 @@ type MetadataConfig struct { // KeyAuthor string `envconfig:"MSG_MD_KEY_AUTHOR" default:"author" required:"true"` KeyCategories string `envconfig:"MSG_MD_KEY_CATEGORIES" default:"categories" required:"true"` - KeyGuid string `envconfig:"MSG_MD_KEY_GUID" default:"rssitemguid" required:"true"` KeyImageTitle string `envconfig:"MSG_MD_KEY_IMAGE_TITLE" default:"imagetitle" required:"true"` KeyImageUrl string `envconfig:"MSG_MD_KEY_IMAGE_URL" default:"imageurl" required:"true"` KeyLanguage string `envconfig:"MSG_MD_KEY_LANGUAGE" default:"language" required:"true"` diff --git a/converter/converter.go b/converter/converter.go index 80c8faa..3a8d3f9 100644 --- a/converter/converter.go +++ b/converter/converter.go @@ -93,7 +93,7 @@ func (c converter) Convert(feed *rss.Feed, item *rss.Item) (msg *pb.CloudEvent) } } if item.ID != "" { - attrs[c.cfgMsg.Metadata.KeyGuid] = &pb.CloudEventAttributeValue{ + attrs["subject"] = &pb.CloudEventAttributeValue{ Attr: &pb.CloudEventAttributeValue_CeString{ CeString: item.ID, }, diff --git a/helm/producer-rss/values.yaml b/helm/producer-rss/values.yaml index d92d1d0..21f1df5 100644 --- a/helm/producer-rss/values.yaml +++ b/helm/producer-rss/values.yaml @@ -119,7 +119,6 @@ message: feedTitle: "feedtitle" author: "author" categories: "categories" - guid: "rssitemguid" imageTitle: "imagetitle" imageUrl: "imageurl" language: "language"