wallezhang opened a new issue, #896: URL: https://github.com/apache/incubator-eventmesh/issues/896
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues. ### Enhancement Request When invoking `org.apache.eventmesh.client.grpc.util.EventMeshClientUtil#buildBatchMessages` method without `protocolType` parameter, there is no default value for `ttl` field. And `ttl` field is required for `org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.MessageItem` object, so if event mesh message has no `ttl` property, the method will throw a NPE. <img width="672" alt="image" src="https://user-images.githubusercontent.com/33749/170442098-f58774fe-573f-4836-8d9d-c62da52e9f5a.png"> And there is another enhancement, for reducing `org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.Builder#setTopic` method calls, I think we should move this call to the outer of the loop. ### Describe the solution you'd like If event mesh message has no `ttl` property, we should set a default value with `4000` like other building methods. ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
