mxsm opened a new issue, #4472:
URL: https://github.com/apache/eventmesh/issues/4472

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Environment
   
   Windows
   
   ### EventMesh version
   
   master
   
   ### What happened
   
   when i run AsyncPublishInstance and CloudEventsAsyncSubscribe exmaples, The 
fromCloudEvent method of the MeshMessageProtocol Adaptor in the runtime module 
will throw a NullPointerException.
   
![image](https://github.com/apache/eventmesh/assets/15797831/6ec5c0fb-aa53-41d9-b9dd-525fcce53ef5)
   
   
   ### How to reproduce
   
   run AsyncPublishInstance and CloudEventsAsyncSubscribe exmaples
   
   ### Debug logs
   
   ```
   2023-10-06 19:20:08,648 DEBUG [StandaloneConsumerThread-1] 
EventMeshConsumer(EventMeshConsumer.java:321) - 
message|mq2eventMesh|topic=TEST-TOPIC-GRPC-ASYNC|msg=CloudEvent{id='8227013e-aa52-dcf2-b867-1739265adeee',
 source=/, type='org.apache.eventmesh', datacontenttype='text/plain', 
subject='TEST-TOPIC-GRPC-ASYNC', data=BytesCloudEventData{value=[123, 34, 99, 
111, 110, 116, 101, 110, 116, 34, 58, 34, 116, 101, 115, 116, 65, 115, 121, 
110, 99, 77, 101, 115, 115, 97, 103, 101, 34, 125]}, 
extensions={protocolversion=1.0, seqnum=093262806509808842785971986494, 
ip=172.20.208.1, idc=idc, pid=16200, language=JAVA, sys=1234, env=env, 
ttl=4000, producergroup=EventMeshTest-producerGroup, 
reqmq2eventmeshtimestamp=1696591208648, passwd=passwd, 
protocoltype=eventmeshmessage, uniqueid=359068444901417650922475528892, 
username=username}}
   2023-10-06 19:20:08,649 DEBUG [grpc-nio-worker-ELG-3-2] 
NettyServerHandler(AbstractInternalLogger.java:214) - [id: 0x6a720f13, 
L:/127.0.0.1:10205 - R:/127.0.0.1:64329] OUTBOUND DATA: streamId=3 padding=0 
endStream=false length=516 
bytes=00000001ff0a2463323931626532382d633731392d333337652d643631342d63336230396363616466353812012f1a03312e3022146f72672e6170616368652e...
   2023-10-06 19:20:08,651 ERROR [eventMesh-grpc-pushMsg-1] 
AbstractPushRequest(AbstractPushRequest.java:86) - Error in getting 
EventMeshMessage from CloudEvent
   java.lang.NullPointerException: null
        at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_202]
        at 
org.apache.eventmesh.protocol.meshmessage.MeshMessageProtocolAdaptor.fromCloudEvent(MeshMessageProtocolAdaptor.java:111)
 ~[classes/:?]
        at 
org.apache.eventmesh.runtime.core.protocol.grpc.push.AbstractPushRequest.getEventMeshCloudEvent(AbstractPushRequest.java:83)
 ~[classes/:?]
        at 
org.apache.eventmesh.runtime.core.protocol.grpc.push.AbstractPushRequest.<init>(AbstractPushRequest.java:74)
 ~[classes/:?]
        at 
org.apache.eventmesh.runtime.core.protocol.grpc.push.StreamPushRequest.<init>(StreamPushRequest.java:53)
 ~[classes/:?]
        at 
org.apache.eventmesh.runtime.core.protocol.grpc.push.MessageHandler.createGrpcPushRequest(MessageHandler.java:88)
 ~[classes/:?]
        at 
org.apache.eventmesh.runtime.core.protocol.grpc.push.MessageHandler.lambda$handle$1(MessageHandler.java:74)
 ~[classes/:?]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_202]
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) 
[?:1.8.0_202]
        at java.util.concurrent.FutureTask.run(FutureTask.java) [?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_202]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   2023-10-06 19:20:08,652 INFO  [StandaloneConsumerThread-1] 
Subscribe(Subscribe.java:82) - message ack, topic: TEST-TOPIC-GRPC-ASYNC, 
current offset:1
   
   ```
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct) *


-- 
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]

Reply via email to