Skip to content

CQN Callback does not run #409

@rducrot

Description

@rducrot
  1. What versions are you using?

Database version:

  • Oracle 19.24.0.0.0

Test Platforms:

  • platform.platform: Linux-6.8.0-47-generic-x86_64-with-glibc2.35
    sys.maxsize > 2**32: True
    platform.python_version: 3.10.12
    instantclient: 23.4.0.24.05
  • platform.platform: Linux-6.9.9-amd64-x86_64-with-glibc2.40
    sys.maxsize > 2**32: True
    platform.python_version: 3.11.2
    instantclient: 19.19.0.0.0

Oracledb versions:

  • 2.3.0
  • 2.4.0
  • 2.4.1
  1. Is it an error or a hang or a crash?
    Abnormal behavior

  2. What error(s) or behavior you are seeing?
    We try to run the script below on a third party database.
    It works until Oracledb version 2.2.1. Starting with version 2.3.0, the callback does not run.
    On the server, we do see outgoing notification packets.

  3. Does your application call init_oracle_client()?
    Yes

  4. Include a runnable Python script that shows the problem.

import oracledb

oracledb.init_oracle_client()
connection = oracledb.connect(
    user='example',
    password='example',
    dsn='example/example',
    port=1521,
    events=True,
)

def callback(message):
    print(message)

listener = connection.subscribe(
    callback=callback,
    operations=oracledb.OPCODE_UPDATE,
    qos=oracledb.SUBSCR_QOS_BEST_EFFORT | oracledb.SUBSCR_QOS_ROWIDS,
    client_initiated=True,
)

listener.registerquery('SELECT * FROM EXAMPLE.EXAMPLE')

input("Hit enter to stop")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions