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 source to the event "source" attribute instead of "subject"
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Oct 13, 2023
1 parent 724da75 commit 872a19f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ func (c converter) Convert(feed *rss.Feed, item *rss.Item) (msg *pb.CloudEvent)
t = item.Date.UTC()
}
attrs := map[string]*pb.CloudEventAttributeValue{
"subject": {
Attr: &pb.CloudEventAttributeValue_CeString{
CeString: item.Link,
},
},
"time": {
Attr: &pb.CloudEventAttributeValue_CeTimestamp{
CeTimestamp: timestamppb.New(t),
Expand Down Expand Up @@ -157,7 +152,7 @@ func (c converter) Convert(feed *rss.Feed, item *rss.Item) (msg *pb.CloudEvent)
msg = &pb.CloudEvent{
Id: uuid.NewString(),
SpecVersion: c.cfgMsg.Metadata.SpecVersion,
Source: feed.Link,
Source: item.Link,
Type: "com.github.awakari.producer-rss",
Attributes: attrs,
}
Expand Down

0 comments on commit 872a19f

Please sign in to comment.