public abstract class MessageMetadata extends Object
Publisher.publish(com.google.pubsub.v1.PubsubMessage) api or the PubsubMessage.getMessageId() field on received messages.| Constructor and Description |
|---|
MessageMetadata() |
| Modifier and Type | Method and Description |
|---|---|
static MessageMetadata |
decode(String encoded)
Decode a MessageMetadata from the Cloud Pub/Sub ack id.
|
String |
encode()
Encode a publish metadata as a Cloud Pub/Sub ack id.
|
static MessageMetadata |
of(Partition partition,
Offset offset)
Construct a MessageMetadata from a Partition and Offset.
|
abstract Offset |
offset()
The offset a message was assigned.
|
abstract Partition |
partition()
The partition a message was published to.
|
public abstract Partition partition()
public abstract Offset offset()
public static MessageMetadata of(Partition partition, Offset offset)
public static MessageMetadata decode(String encoded) throws com.google.api.gax.rpc.ApiException
com.google.api.gax.rpc.ApiExceptionpublic String encode()
Copyright © 2021 Google LLC. All rights reserved.