You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In HttpSourceConnector#poll, the conversion from cloudevent to connectRecord is performed.
If a cloudevent contains null subject, connectRecord.addExtension("topic", event.getSubject()) will throw unexpected NPE, which will stop the connector server.
Fix
Check subject before saving cloudevents. We don't need to check other attributes like id, source, type,etc. Because they are required arrtibutes of cloudevents and cloudevents-sdk will do the check in toEvent().
Search before asking
Environment
Linux
EventMesh version
master
What happened
HTTP source connector stop after receiving an request without attribute
subject
and never response again.How to reproduce
Reproduce
subject
, such asAnalysis
In
HttpSourceConnector#poll
, the conversion from cloudevent to connectRecord is performed.If a cloudevent contains null
subject
,connectRecord.addExtension("topic", event.getSubject())
will throw unexpected NPE, which will stop the connector server.Fix
Check
subject
before saving cloudevents. We don't need to check other attributes likeid
,source
,type
,etc. Because they are required arrtibutes of cloudevents and cloudevents-sdk will do the check intoEvent()
.Debug logs
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: