zakariah1
zakariah1

Reputation: 394

Oracle Advanced Queuing Service via Node.js -- dequeue a Message Gives Error Message Error: ORA-25215: user_data type and queue type do not match

I get the following message when trying to dequeue a message in a Node.js program. I am using node-oracledb Version 5.5.0. The documentation says that this is an error for enqueueing a message. The message that i am trying to retrieve (dequeue) is a simple object. I have tried passing the object type as well, but that does not seem to work either. I have no problem enqueuing a message from a different route inside this same node.js program. Thanks in advance for any help and/or passive aggressive insults.

Error: ORA-25215: user_data type and queue type do not match

 async dequeueOne() {

    const pool = await sow.getPool();

    const connection = await pool.getConnection();

    const queue = await connection.getQueue(queueName, payloadType: "Name of Object Type");

    queue.deqOptions.wait = oracledb.AQ_DEQ_NO_WAIT;

    let msg ;

    try {

        msg = await queue.deqOne();

    }

    catch(e) {

        console.log(`Error dequeuing: '${e}'`);

    }

    finally {

        await connection.commit();

        await connection.close();

    }

    return msg;

}

Upvotes: 0

Views: 301

Answers (0)

Related Questions