Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
set the item id to the subject attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Oct 13, 2023
1 parent 872a19f commit 7ed6c64
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 0 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
1 change: 0 additions & 1 deletion helm/producer-rss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ message:
feedTitle: "feedtitle"
author: "author"
categories: "categories"
guid: "rssitemguid"
imageTitle: "imagetitle"
imageUrl: "imageurl"
language: "language"
Expand Down

0 comments on commit 7ed6c64

Please sign in to comment.