Interface KeyExtractor
public interface KeyExtractor
A KeyExtractor can extract the Pub/Sub Lite 'key' field used for message routing from a
PubsubMessage. It will by default use the ordering_key field directly for this if it exists.
An empty ByteString implies that the message should have no ordering key.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyExtractorAn extractor that gets the routing key from the ordering key field. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.ByteStringextractKey(com.google.pubsub.v1.PubsubMessage message) Extract the ByteString routing key from a PubsubMessage.
-
Field Details
-
DEFAULT
An extractor that gets the routing key from the ordering key field.
-
-
Method Details
-
extractKey
com.google.protobuf.ByteString extractKey(com.google.pubsub.v1.PubsubMessage message) throws com.google.api.gax.rpc.ApiException Extract the ByteString routing key from a PubsubMessage.- Throws:
com.google.api.gax.rpc.ApiException
-