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

Events sent only if Transformation succeeded #30

Merged
merged 1 commit into from
Sep 19, 2020

Conversation

tzununbekov
Copy link
Member

  • strict Event type matching replaced with strings.Contains() method to support HTTPTarget headers (application/json; charset=utf-8 instead of just application/json),
  • errors returned from CE Receiver function (ceClient.StartReceiver(ctx, receiver)) are not honored and not logged; additional logging added inside the receiver function itself,
  • events that were not properly transformed due to the internal errors were sent back to the broker and eventually were looped because of the missing filtering attributes. This PR changes his behavior - events will be sent only if transformation succeed.

Comment on lines +90 to +91
log.Printf("Cannot encode CE context: %v", err)
return nil, fmt.Errorf("cannot encode CE context: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid SDK.

@tzununbekov tzununbekov merged commit 99d8770 into master Sep 19, 2020
@tzununbekov tzununbekov deleted the strict-err-handling branch September 19, 2020 10:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants