Consumer

class borneo.changestream.Consumer(builder)[source]

Bases: object

Main object used to consume Change Streams messages.

Use ConsumerBuilder to create instances of this class. The poll() method is not thread-safe.

Methods Summary

add_table(table_name[, compartment, ...])

Adds a table to the current consumer group.

close()

Closes this consumer and releases server-side resources for it.

commit([timeout_ms])

Marks the messages from this consumer's latest poll as committed.

commit_bundle(bundle[, timeout_ms])

Marks the messages in the specified bundle as committed.

delete_group(handle, group_id[, ...])

Deletes a Change Streams consumer group.

poll(limit, wait_ms)

Gets Change Streams messages for this consumer.

remove_table(table_name[, compartment])

Removes a table from the current consumer group.

reset()

Resets this consumer without committing poll results.

Methods Documentation

add_table(table_name, compartment=None, start_location=None)[source]

Adds a table to the current consumer group.

The table name may be a table OCID. The compartment is used to resolve the table name to a table OCID. If compartment is not set, the configured default compartment is used for that table lookup.

close()[source]

Closes this consumer and releases server-side resources for it.

commit(timeout_ms=None)[source]

Marks the messages from this consumer’s latest poll as committed.

commit_bundle(bundle, timeout_ms=None)[source]

Marks the messages in the specified bundle as committed.

static delete_group(handle, group_id, compartment=None, force_stop=False)[source]

Deletes a Change Streams consumer group.

poll(limit, wait_ms)[source]

Gets Change Streams messages for this consumer.

remove_table(table_name, compartment=None)[source]

Removes a table from the current consumer group.

The table name may be a table OCID. The compartment is used to resolve the table name to a table OCID. If compartment is not set, the configured default compartment is used for that table lookup.

reset()[source]

Resets this consumer without committing poll results.