You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
Read release policy
I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
Example detailed here seems outdated. I've followed every step but still can't see new records in PostgreSQL. For comparison, there's seems to be no issue when switching to Cassandra with the same schema and producer setup. I've tried with both local and dockerized Postgres databases.
Seems to be related to the schema Postgres is using which is weird I'm using the same schema as the getting started example for Pulsar IO.
org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "pulsar_postgres_jdbc_sink" violates not-null constraint
Detail: Failing row contains (null, null).
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) ~[postgresql-42.5.1.jar:42.5.1]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366) ~[postgresql-42.5.1.jar:42.5.1]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356) ~[postgresql-42.5.1.jar:42.5.1]
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496) ~[postgresql-42.5.1.jar:42.5.1]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413) ~[postgresql-42.5.1.jar:42.5.1]
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190) ~[postgresql-42.5.1.jar:42.5.1]
at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:177) ~[postgresql-42.5.1.jar:42.5.1]
at org.apache.pulsar.io.jdbc.JdbcAbstractSink.flush(JdbcAbstractSink.java:289) ~[pulsar-io-jdbc-core-3.2.2.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Search before asking
Read release policy
Version
OS: macOS Sonoma 14.4.1
Java: OpenJDK 17.0.11
Pulsar: 3.2.1
Minimal reproduce step
Example detailed here seems outdated. I've followed every step but still can't see new records in PostgreSQL. For comparison, there's seems to be no issue when switching to Cassandra with the same schema and producer setup. I've tried with both local and dockerized Postgres databases.
pulsar-postgres-jdbc-sink.yaml
schema
main.rs
- 127.0.0.1:9999 sends dummy data e.g.{"id" 1, "name" "abcdefg"}
whichmain
then sends to Pulsar.Complete setup:
What did you expect to see?
PostgreSQL table
pulsar_postgres_jdbc_sink
being populated in real-time.What did you see instead?
PostgreSQL table
pulsar_postgres_jdbc_sink
is empty although Pulsar is the producing the message properly.Anything else?
No issues when inspecting the sink or the topic. Pulsar is able to produce the messages.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: