tfio.experimental.streaming.PulsarWriter
Stay organized with collections
Save and categorize content based on your preferences.
PulsarWriter
tfio.experimental.streaming.PulsarWriter(
service_url, topic
)
Args |
service_url
|
A tf.string tensor containing the service url of pulsar broker.
For example: "pulsar://localhost:6650".
|
topic
|
A tf.string tensor containing the topic name.
|
Methods
flush
View source
flush()
Flush the queued messages, it will wait async write operations completed.
write
View source
write(
value, key=''
)
Write a message to pulsar topic asynchronously
Args |
value
|
A tf.string tensor containing the value of message
|
key
|
A tf.string tensor containing the key of message, if it's an empty string, the message will have no key.
Default: ""
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-15 UTC.
[null,null,["Last updated 2022-02-15 UTC."],[],[],null,["# tfio.experimental.streaming.PulsarWriter\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/experimental/pulsar_writer_ops.py#L21-L48) |\n\nPulsarWriter \n\n tfio.experimental.streaming.PulsarWriter(\n service_url, topic\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `service_url` | A [`tf.string`](https://www.tensorflow.org/api_docs/python/tf#string) tensor containing the service url of pulsar broker. For example: \"pulsar://localhost:6650\". |\n| `topic` | A [`tf.string`](https://www.tensorflow.org/api_docs/python/tf#string) tensor containing the topic name. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `flush`\n\n[View source](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/experimental/pulsar_writer_ops.py#L46-L48) \n\n flush()\n\nFlush the queued messages, it will wait async write operations completed.\n\n### `write`\n\n[View source](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/experimental/pulsar_writer_ops.py#L36-L44) \n\n write(\n value, key=''\n )\n\nWrite a message to pulsar topic asynchronously\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `value` | A [`tf.string`](https://www.tensorflow.org/api_docs/python/tf#string) tensor containing the value of message |\n| `key` | A [`tf.string`](https://www.tensorflow.org/api_docs/python/tf#string) tensor containing the key of message, if it's an empty string, the message will have no key. Default: \"\" |\n\n\u003cbr /\u003e"]]