I am facing the below problem:
Both my DB server and Application server have full duplex connection. But I am not getting any notifications or error. I am using :
oracledb: 5.3.0
Node version : 12.2.2
oracle DB : 19 C
oracle client : 12.2
server : linux
Below is my code:
function myCallback(message) {
console.log(`Listened new data insertion`);
//Calling a function
postMessage();
}
const options = {
callback: myCallback,
sql: `SELECT ID FROM tableName where user_id = 0`,
qos: oracledb.SUBSCR_QOS_ROWIDS,
clientInitiated: true
};
async function listener() {
let connection;
try {
connection = await oracledb.getConnection({
user: `${userName}`,
password: `${userPass}`,
connectString: `${connString}`,
externalAuth: false,
events: true
});
await connection.subscribe('mysub', options);
console.log("App is Listening To table");
} catch (err) {
console.log("Error on Listening" + err);
}
}