Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct use of Encoders should be possible #286

Closed
deissnerk opened this issue Jan 21, 2020 · 2 comments · Fixed by #302
Closed

Direct use of Encoders should be possible #286

deissnerk opened this issue Jan 21, 2020 · 2 comments · Fixed by #302
Assignees
Milestone

Comments

@deissnerk
Copy link
Contributor

Both existing bindings, HTTP and AMQP, do not export their Encoders. So they can only be instantiated within their packages. The only place I found, was the according Send() method of the Senders. How can I use the Encoders directly, if I prefer to handle the transport directly? In HTTP I might want to use something else then POST, or I might want to implement a special retry logic or react to return codes which do not seem to be exposed.

@slinkydeveloper
Copy link
Member

This is related to the ongoing discussion on fanout implementation: #282, #283, #281

I'm prone to make the encoders public and exposing the logic to use them (which resides now in methods like https://github.com/cloudevents/sdk-go/blob/master/pkg/bindings/http/sender.go#L56), but this heavily depends on how we want to support multi dispatch of the same message.

@n3wscott n3wscott added the SDKv2 label Jan 24, 2020
@n3wscott
Copy link
Member

I agree this should be possible. We will make it so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants