blob: 5a56d8ee23b99df7176fbfa118ed2ecd07940a43 [file]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>pulsar.Message</title>
<meta name="generator" content="pydoctor 23.4.0.dev0">
</meta>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="apidocs.css" />
<link rel="stylesheet" type="text/css" href="readthedocstheme.css" />
<link rel="stylesheet" type="text/css" href="extra.css" />
</head>
<body>
<nav class="navbar navbar-default mainnavbar">
<div class="container-fluid">
<div class="navbar-header">
<div class="navlinks">
<span class="navbar-brand">
pulsar <a href="index.html">API Documentation</a>
</span>
<a href="moduleIndex.html">
Modules
</a>
<a href="classIndex.html">
Classes
</a>
<a href="nameIndex.html">
Names
</a>
<div id="search-box-container">
<div class="input-group">
<input id="search-box" type="search" name="search-query" placeholder="Search..." aria-label="Search" minlength="2" class="form-control" autocomplete="off" />
<span class="input-group-btn">
<a style="display: none;" class="btn btn-default" id="search-clear-button" title="Clear" onclick="clearSearch()"><img src="fonts/x-circle.svg" alt="Clear" /></a>
<a class="btn btn-default" id="search-help-button" title="Help" onclick="toggleSearchHelpText()"><img src="fonts/info.svg" alt="Help" /></a>
</span>
</div>
</div>
</div>
</div>
</div>
<!-- Side navigation -->
<div class="sidebarcontainer">
<nav class="sidebar">
<div>
<div class="thingTitle">
<span>Class</span>
<code class="thisobject"><a href="pulsar.Message.html" class="internal-link" title="This class"><wbr></wbr>Message</a></code>
</div>
<div>
<div class="childrenKindTitle">Methods</div>
<ul>
<li class="">
<div class="itemName"><code><a href="#data" class="internal-link" title="pulsar.Message.data">data</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#event_timestamp" class="internal-link" title="pulsar.Message.event_timestamp">event<wbr></wbr>_timestamp</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#message_id" class="internal-link" title="pulsar.Message.message_id">message<wbr></wbr>_id</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#partition_key" class="internal-link" title="pulsar.Message.partition_key">partition<wbr></wbr>_key</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#properties" class="internal-link" title="pulsar.Message.properties">properties</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#publish_timestamp" class="internal-link" title="pulsar.Message.publish_timestamp">publish<wbr></wbr>_timestamp</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#redelivery_count" class="internal-link" title="pulsar.Message.redelivery_count">redelivery<wbr></wbr>_count</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#schema_version" class="internal-link" title="pulsar.Message.schema_version">schema<wbr></wbr>_version</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#topic_name" class="internal-link" title="pulsar.Message.topic_name">topic<wbr></wbr>_name</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="#value" class="internal-link" title="pulsar.Message.value">value</a></code>
</div>
</li><li class="private">
<div class="itemName"><code><a href="#_wrap" class="internal-link" title="pulsar.Message._wrap">_wrap</a></code>
</div>
</li>
</ul>
<div class="childrenKindTitle">Attributes</div>
<ul>
<li class="private">
<div class="itemName"><code><a href="#_message" class="internal-link" title="pulsar.Message._message">_message</a></code>
</div>
</li>
</ul>
</div>
</div><div>
<div class="thingTitle">
<span>Package</span>
<code><a href="index.html" class="internal-link" title="The parent of this class">pulsar</a></code>
</div>
<div>
<div class="childrenKindTitle">Modules</div>
<ul>
<li class="">
<div class="itemName"><code><a href="pulsar.functions.html" class="internal-link" title="pulsar.functions">functions</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.schema.html" class="internal-link" title="pulsar.schema">schema</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.__about__.html" class="internal-link" title="pulsar.__about__">__about__</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.exceptions.html" class="internal-link" title="pulsar.exceptions">exceptions</a></code>
</div>
</li>
</ul>
<div class="childrenKindTitle">Classes</div>
<ul>
<li class="">
<div class="itemName"><code><a href="pulsar.Authentication.html" class="internal-link" title="pulsar.Authentication"><wbr></wbr>Authentication</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.AuthenticationAthenz.html" class="internal-link" title="pulsar.AuthenticationAthenz"><wbr></wbr>Authentication<wbr></wbr>Athenz</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.AuthenticationBasic.html" class="internal-link" title="pulsar.AuthenticationBasic"><wbr></wbr>Authentication<wbr></wbr>Basic</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.AuthenticationOauth2.html" class="internal-link" title="pulsar.AuthenticationOauth2"><wbr></wbr>Authentication<wbr></wbr>Oauth2</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.AuthenticationTLS.html" class="internal-link" title="pulsar.AuthenticationTLS"><wbr></wbr>Authentication<wbr></wbr>TLS</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.AuthenticationToken.html" class="internal-link" title="pulsar.AuthenticationToken"><wbr></wbr>Authentication<wbr></wbr>Token</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.Client.html" class="internal-link" title="pulsar.Client"><wbr></wbr>Client</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.ConsoleLogger.html" class="internal-link" title="pulsar.ConsoleLogger"><wbr></wbr>Console<wbr></wbr>Logger</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.Consumer.html" class="internal-link" title="pulsar.Consumer"><wbr></wbr>Consumer</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.ConsumerBatchReceivePolicy.html" class="internal-link" title="pulsar.ConsumerBatchReceivePolicy"><wbr></wbr>Consumer<wbr></wbr>Batch<wbr></wbr>Receive<wbr></wbr>Policy</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.CryptoKeyReader.html" class="internal-link" title="pulsar.CryptoKeyReader"><wbr></wbr>Crypto<wbr></wbr>Key<wbr></wbr>Reader</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.FileLogger.html" class="internal-link" title="pulsar.FileLogger"><wbr></wbr>File<wbr></wbr>Logger</a></code>
</div>
</li><li class=" thisobject">
<div class="itemName"><code><a href="pulsar.Message.html" class="internal-link" title="pulsar.Message"><wbr></wbr>Message</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.MessageBatch.html" class="internal-link" title="pulsar.MessageBatch"><wbr></wbr>Message<wbr></wbr>Batch</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.MessageId.html" class="internal-link" title="pulsar.MessageId"><wbr></wbr>Message<wbr></wbr>Id</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.Producer.html" class="internal-link" title="pulsar.Producer"><wbr></wbr>Producer</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="pulsar.Reader.html" class="internal-link" title="pulsar.Reader"><wbr></wbr>Reader</a></code>
</div>
</li>
</ul>
<div class="childrenKindTitle">Functions</div>
<ul>
<li class="private">
<div class="itemName"><code><a href="index.html#_check_type" class="internal-link" title="pulsar._check_type">_check<wbr></wbr>_type</a></code>
</div>
</li><li class="private">
<div class="itemName"><code><a href="index.html#_check_type_or_none" class="internal-link" title="pulsar._check_type_or_none">_check<wbr></wbr>_type<wbr></wbr>_or<wbr></wbr>_none</a></code>
</div>
</li><li class="private">
<div class="itemName"><code><a href="index.html#_listener_wrapper" class="internal-link" title="pulsar._listener_wrapper">_listener<wbr></wbr>_wrapper</a></code>
</div>
</li>
</ul>
<div class="childrenKindTitle">Variables</div>
<ul>
<li class="private">
<div class="itemName"><code><a href="index.html#_retype" class="internal-link" title="pulsar._retype">_retype</a></code>
</div>
</li>
</ul>
</div>
</div>
</nav>
<!-- No sidebar toggle for read the docs theme, the sidebar is always
visible when the screen is width enough.
-->
</div>
</nav>
<div class="container-fluid">
<div id="main" class="">
<div id="search-results-container" style="display: none;">
<div id="search-buttons">
<span class="label label-default" id="search-docstrings-button">
<label class="checkbox-inline">
<input type="checkbox" id="toggle-search-in-docstrings-checkbox" value="false" onclick="toggleSearchInDocstrings()">
search in docstrings
</input>
</label>
</span>
</div>
<noscript>
<h1>Cannot search: JavaScript is not supported/enabled in your browser.</h1>
</noscript>
<div class="hint" id="search-help-box">
<p class="rst-last">
Search bar offers the following options:
<ul>
<li>
<strong>Term presence.</strong> The below example searches for documents that
must contain “foo”, might contain “bar” and must not contain “baz”: <code>+foo bar -baz</code>
</li>
<li>
<strong>Wildcards.</strong> The below example searches for documents with words beginning with “foo”: <code>foo*</code>
</li>
<li>
<strong>Search in specific fields.</strong> The following search matches all objects
in "twisted.mail" that matches “search”: <code>+qname:twisted.mail.* +search</code>
<p>
Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'.
Last two fields are only applicable if "search in docstrings" is enabled.
</p>
</li>
<li>
<strong>Fuzzy matches.</strong> The following search matches all documents
that have a word within 1 edit distance of “foo”: <code>foo~1</code>
</li>
</ul>
</p>
</div>
<div id="search-status"> </div>
<div class="warning" id="search-warn-box" style="display: none;">
<p class="rst-last"><span id="search-warn"></span></p>
</div>
<table id="search-results">
<!-- Filled dynamically by JS -->
</table>
<div style="margin-top: 8px;">
<p>Results provided by <a href="https://lunrjs.com">Lunr.js</a></p>
</div>
</div>
<div class="page-header">
<h1 class="class"><code><code><a href="index.html" class="internal-link">pulsar</a></code><wbr></wbr>.<code><a href="pulsar.Message.html" class="internal-link" title="pulsar.Message">Message</a></code></code></h1>
<div id="showPrivate">
<button class="btn btn-link" onclick="togglePrivate()">Toggle Private API</button>
</div>
</div>
<div class="categoryHeader">
class documentation
</div>
<div class="extrasDocstring">
<p class="class-signature"><code><span class="py-keyword">class</span> <span class="py-defname">Message</span>: <a href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L114" class="sourceLink">(source)</a></code></p>
<p><a href="classIndex.html#pulsar.Message">View In Hierarchy</a></p>
</div>
<div class="moduleDocstring">
<div><p>Message objects are returned by a consumer, either by calling <code><a href="pulsar.Consumer.html#receive" class="internal-link" title="pulsar.Consumer.receive">receive</a></code> or
through a listener.</p></div>
</div>
<div id="splitTables">
<table class="children sortable" id="id52">
<tr class="method">
<td>Method</td>
<td><code><a href="#data" class="internal-link" title="pulsar.Message.data">data</a></code></td>
<td>Returns object typed bytes with the payload of the message.</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#event_timestamp" class="internal-link" title="pulsar.Message.event_timestamp">event<wbr></wbr>_timestamp</a></code></td>
<td>Get the timestamp in milliseconds with the message event time.</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#message_id" class="internal-link" title="pulsar.Message.message_id">message<wbr></wbr>_id</a></code></td>
<td>The message ID that can be used to refer to this particular message.</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#partition_key" class="internal-link" title="pulsar.Message.partition_key">partition<wbr></wbr>_key</a></code></td>
<td>Get the partitioning key for the message.</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#properties" class="internal-link" title="pulsar.Message.properties">properties</a></code></td>
<td>Return the properties attached to the message. Properties are application-defined key/value pairs that will be attached to the message.</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#publish_timestamp" class="internal-link" title="pulsar.Message.publish_timestamp">publish<wbr></wbr>_timestamp</a></code></td>
<td>Get the timestamp in milliseconds with the message publish time.</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#redelivery_count" class="internal-link" title="pulsar.Message.redelivery_count">redelivery<wbr></wbr>_count</a></code></td>
<td>Get the redelivery count for this message</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#schema_version" class="internal-link" title="pulsar.Message.schema_version">schema<wbr></wbr>_version</a></code></td>
<td>Get the schema version for this message</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#topic_name" class="internal-link" title="pulsar.Message.topic_name">topic<wbr></wbr>_name</a></code></td>
<td>Get the topic Name from which this message originated from</td>
</tr><tr class="method">
<td>Method</td>
<td><code><a href="#value" class="internal-link" title="pulsar.Message.value">value</a></code></td>
<td>Returns object with the de-serialized version of the message content</td>
</tr><tr class="staticmethod private">
<td>Static Method</td>
<td><code><a href="#_wrap" class="internal-link" title="pulsar.Message._wrap">_wrap</a></code></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="instancevariable private">
<td>Instance Variable</td>
<td><code><a href="#_message" class="internal-link" title="pulsar.Message._message">_message</a></code></td>
<td><span class="undocumented">Undocumented</span></td>
</tr>
</table>
</div>
<div id="childList">
<div class="basemethod">
<a name="pulsar.Message.data">
</a>
<a name="data">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">data</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L120">
(source)
</a>
<a class="headerLink" href="#data" title="pulsar.Message.data">
</a>
</div>
<div class="docstring functionBody">
<div><p>Returns object typed bytes with the payload of the message.</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.event_timestamp">
</a>
<a name="event_timestamp">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">event_timestamp</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L152">
(source)
</a>
<a class="headerLink" href="#event_timestamp" title="pulsar.Message.event_timestamp">
</a>
</div>
<div class="docstring functionBody">
<div><p>Get the timestamp in milliseconds with the message event time.</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.message_id">
</a>
<a name="message_id">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">message_id</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L158">
(source)
</a>
<a class="headerLink" href="#message_id" title="pulsar.Message.message_id">
</a>
</div>
<div class="docstring functionBody">
<div><p>The message ID that can be used to refer to this particular message.</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.partition_key">
</a>
<a name="partition_key">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">partition_key</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L140">
(source)
</a>
<a class="headerLink" href="#partition_key" title="pulsar.Message.partition_key">
</a>
</div>
<div class="docstring functionBody">
<div><p>Get the partitioning key for the message.</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.properties">
</a>
<a name="properties">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">properties</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L132">
(source)
</a>
<a class="headerLink" href="#properties" title="pulsar.Message.properties">
</a>
</div>
<div class="docstring functionBody">
<div><p>Return the properties attached to the message. Properties are
application-defined key/value pairs that will be attached to the
message.</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.publish_timestamp">
</a>
<a name="publish_timestamp">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">publish_timestamp</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L146">
(source)
</a>
<a class="headerLink" href="#publish_timestamp" title="pulsar.Message.publish_timestamp">
</a>
</div>
<div class="docstring functionBody">
<div><p>Get the timestamp in milliseconds with the message publish time.</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.redelivery_count">
</a>
<a name="redelivery_count">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">redelivery_count</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L170">
(source)
</a>
<a class="headerLink" href="#redelivery_count" title="pulsar.Message.redelivery_count">
</a>
</div>
<div class="docstring functionBody">
<div><p>Get the redelivery count for this message</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.schema_version">
</a>
<a name="schema_version">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">schema_version</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L176">
(source)
</a>
<a class="headerLink" href="#schema_version" title="pulsar.Message.schema_version">
</a>
</div>
<div class="docstring functionBody">
<div><p>Get the schema version for this message</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.topic_name">
</a>
<a name="topic_name">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">topic_name</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L164">
(source)
</a>
<a class="headerLink" href="#topic_name" title="pulsar.Message.topic_name">
</a>
</div>
<div class="docstring functionBody">
<div><p>Get the topic Name from which this message originated from</p></div>
</div>
</div><div class="basemethod">
<a name="pulsar.Message.value">
</a>
<a name="value">
</a>
<div class="functionHeader">
<span class="py-keyword">def</span> <span class="py-defname">value</span><span class="function-signature">(self)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L126">
(source)
</a>
<a class="headerLink" href="#value" title="pulsar.Message.value">
</a>
</div>
<div class="docstring functionBody">
<div><p>Returns object with the de-serialized version of the message content</p></div>
</div>
</div><div class="basestaticmethod private">
<a name="pulsar.Message._wrap">
</a>
<a name="_wrap">
</a>
<div class="functionHeader">
@<a href="https://docs.python.org/3/library/functions.html#staticmethod" class="intersphinx-link">staticmethod</a><br />
<span class="py-keyword">def</span> <span class="py-defname">_wrap</span><span class="function-signature">(_message)</span>:
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L182">
(source)
</a>
<a class="headerLink" href="#_wrap" title="pulsar.Message._wrap">
</a>
</div>
<div class="docstring functionBody">
<div><p class="undocumented">Undocumented</p></div>
</div>
</div><div class="baseinstancevariable private">
<a name="pulsar.Message._message">
</a>
<a name="_message">
</a>
<div class="functionHeader">
<span class="py-defname">_message</span> =
<a class="sourceLink" href="https://github.com/apache/pulsar-client-python/tree/v.0/pulsar/__init__.py#L185">
(source)
</a>
<a class="headerLink" href="#_message" title="pulsar.Message._message">
</a>
</div>
<div class="functionBody">
<div><p class="undocumented">Undocumented</p></div>
</div>
</div>
</div>
</div>
</div>
<footer class="navbar navbar-default">
<hr />
<div class="container">
<a href="index.html">API Documentation</a> for pulsar,
generated by <a href="https://github.com/twisted/pydoctor/">pydoctor</a>
23.4.0.dev0 at 2023-06-05 15:41:56.
</div>
<script src="ajax.js" type="text/javascript"></script>
<script src="searchlib.js" type="text/javascript"></script>
<script src="search.js" type="text/javascript"></script>
</footer>
<script src="pydoctor.js" type="text/javascript"></script>
</body>
</html>