cbornet commented on code in PR #16740:
URL: https://github.com/apache/pulsar/pull/16740#discussion_r931504298


##########
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java:
##########
@@ -384,7 +386,12 @@ private void sendOutputMessage(Record srcRecord, Object 
output) throws Exception
         try {
             this.sink.write(sinkRecord);
         } catch (Exception e) {
-            log.info("Encountered exception in sink write: ", e);
+            if (e instanceof ClassCastException && functionClassLoader != 
componentClassLoader) {

Review Comment:
   If you have a Function with the Sink we use the input type of the Function 
to configure the PulsarSource instead of the Sink type. See 
[here](https://github.com/apache/pulsar/pull/16740/files#diff-f35e3b19e9f35ef9e868df2020221324c959deb664bff63437bb3a2ddf929397R484-R489).
   Does it answer your concerns ?



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

Reply via email to