oracle / node-oracledb

Oracle Database driver for Node.js maintained by Oracle Corp.
http://oracle.github.io/node-oracledb/
Other
2.24k stars 1.07k forks source link

CQN is not working with clientInitiated true option #1542

Closed Shubh0817 closed 1 year ago

Shubh0817 commented 1 year ago
  1. What versions are you using?

Give your database version. select * from product_component_version; output: VERSION:19.0.0.0.0 VERSION_FULL:19.18.0.0.0 STATUS:Production PRODUCT:Oracle Database 19c Enterprise Edition

Also run node and show the output of: process.platform:'linux' process.version:'v18.12.1' process.arch:'x64' require('oracledb').versionString:'5.2.0' require('oracledb').oracleClientVersionString:'21.9.0.0.0'

  1. Describe the problem

function callThisFun(message) { const printMessage = JSON.stringify(message?.tables) console.log(printMessage) logger.info(db change info: ${printMessage}) } const options = { clientInitiated: true, callback: callThisFun, events: true, sql: Select * from MASTER_TABLE_CRUD_DEMO, }

let connection = await oracledb.getConnection(pool); connection.subscribe(tableName, options);

I am not getting any issue while running code but when I change or alter table in DB then my callback function is not getting invoked.

cjbj commented 1 year ago

Try a 19c client just in case it (being the LTS version) has some additional patch from the CQN team.

Some options like grouping may not be supported by clientInitiated.

As a general rule it wouldn't hurt to update to node-oracledb 5.5.

Shubh0817 commented 1 year ago

Try a 19c client just in case it (being the LTS version) has some additional patch from the CQN team.

Some options like grouping may not be supported by clientInitiated.

As a general rule it wouldn't hurt to update to node-oracledb 5.5.

I have updated node-oracledb to 5.5.0 with instant client 19.18.0.0.0.

still clientInitiated field is not working.

I tried with ip and port but facing issue as [Error: ORA-24912: Listener thread failed. Listen failed.] { errorNum: 24912, offset: 0 }

Note-> My DB and App is on different server.

stale[bot] commented 1 year ago

This issue has been automatically marked as inactive because it has not been updated recently. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically closed because it has not been updated for a month.