xwm1992 commented on code in PR #2063:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2063#discussion_r1011089505


##########
eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/SubScribeTask.java:
##########
@@ -57,8 +57,9 @@ public void run() {
                 if (offset == null) {
                     CloudEvent message = 
standaloneBroker.getMessage(topicName);
                     if (message != null) {
-                        if (message.getExtension("offset") != null) {
-                            offset = new AtomicInteger((int) 
message.getExtension("offset"));
+                        Object tmpOffset = message.getExtension("offset");
+                        if (tmpOffset instanceof Integer) {
+                            offset = new AtomicInteger((Integer) tmpOffset);

Review Comment:
   Here please change to `new 
AtomicInteger(Integer.parseInt(tmpOffset.toString()))`



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