yr.fnruntime.Consumer

Contents

yr.fnruntime.Consumer#

class yr.fnruntime.Consumer#

Bases: object

Consumer interface class.

Examples

>>> try:
...     config = yr.SubscriptionConfig("subName", yr.SubscriptionConfig.subscriptionType.STREAM)
...     consumer = yr.create_stream_consumer("streamName", config)
...     # .......
...     elements = consumer.receive(6000, 1)
... except RuntimeError as exp:
...     # .......
...     pass

Methods

__init__

ack

After the consumer finishes using the element identified by element_id, it must acknowledge (ack) the element.

close

Turning off consumer will automatically trigger Ack.

receive

Consumer receives data with subscription support.