nlu90 commented on issue #11789: URL: https://github.com/apache/pulsar/issues/11789#issuecomment-906103260
Please try to run the function with java 11. I tested with master branch on java 11, the function runs fine. ``` ➜ sn-pulsar git:(master) ✗ java -version java version "11.0.11" 2021-04-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode) ``` ``` ➜ sn-pulsar git:(master) ./bin/pulsar-admin functions create --jar ./pulsar-functions/java-examples/target/pulsar-functions-api-examples.jar --classname org.apache.pulsar.functions.api.examples.ExclamationFunction --inputs persistent://public/default/my-topic --name exclamation --tenant public --namespace default --output persistent://public/default/output "Created successfully" ``` ``` ➜ sn-pulsar git:(master) ✗ ./bin/pulsar-client produce -m "$i. hello" public/default/my-topic ... 22:15:26.993 [main] INFO org.apache.pulsar.client.cli.PulsarClientTool - 1 messages successfully produced ``` ``` ➜ sn-pulsar git:(master) ✗ ./bin/pulsar-client consume -n 0 -s tttt public/default/output ... ----- got message ----- key:[null], properties:[__pfn_input_msg_id__=CPoMEAAgADAB, __pfn_input_topic__=persistent://public/default/my-topic], content:. hello! ... ``` -- 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]
