Skip to content

[ISSUE #865] EM-Webhook: repair exception handling && send webhook CloudEvents #914

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

Merged
merged 14 commits into from
Jun 18, 2022
Merged

[ISSUE #865] EM-Webhook: repair exception handling && send webhook CloudEvents #914

merged 14 commits into from
Jun 18, 2022

Conversation

eight-nines
Copy link
Contributor

@eight-nines eight-nines commented Jun 12, 2022

Fixes ISSUE #<865>.

Motivation

repair exception handling && send webhook CloudEvents

  • Enhance the integrity of code functionality
  • Fix some bad code

@qqeasonchen
Copy link
Contributor

@eight-nines please create an issue first and associate it with this pr.

@eight-nines eight-nines changed the title EM-Webhook: repair exception handling && send webhook CloudEvents [ISSUE #865] EM-Webhook: repair exception handling && send webhook CloudEvents Jun 13, 2022
@eight-nines
Copy link
Contributor Author

@eight-nines please create an issue first and associate it with this pr.

Yes, please have a look

@qqeasonchen
Copy link
Contributor

@eight-nines please pay attention to the CI check fail task

try (final InputStream inputStream = WebHookController.class.getClassLoader().getResourceAsStream("eventmesh.properties")) {
properties = new Properties();
properties.load(inputStream);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

每次调用读一次吗?

Copy link
Contributor

Choose a reason for hiding this comment

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

cloudEvent Producer 支持http,rocketmq等。具体是那种WebHookConfig 有配置,里面有cloudevent服务的地址,端口,topic

Copy link
Contributor

Choose a reason for hiding this comment

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

注意 producer的缓存,不能反复创建

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,I fixed it

.withType(eventType)
.withData(body)
.build();
eventMeshHttpProducer.publish(event);
Copy link
Contributor

Choose a reason for hiding this comment

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

不可能只支持http

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@eight-nines
Copy link
Contributor Author

I'll do my best

Copy link
Contributor

@xwm1992 xwm1992 left a comment

Choose a reason for hiding this comment

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

LGTM

@xwm1992 xwm1992 merged commit f91d7e6 into apache:webhook Jun 18, 2022
xwm1992 added a commit that referenced this pull request Aug 4, 2022
[ISSUE #865] EM-Webhook: repair exception handling && send webhook CloudEvents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants