public final class KafkaNotificationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static TopicPartition |
getKafkaTopicPartition(String topic,
Id.NotificationFeed feed)
Map a
Id.NotificationFeed to a Kafka topic partition. |
static Id.NotificationFeed |
getMessageFeed(String messageKey)
Return the
Id.NotificationFeed attached to a Kafka message containing a notification. |
static String |
getMessageKey(Id.NotificationFeed feed)
Build the key of a Kafka message based on a
feed. |
public static TopicPartition getKafkaTopicPartition(String topic, Id.NotificationFeed feed)
Id.NotificationFeed to a Kafka topic partition.feed - Id.NotificationFeed objecttopic - kafka topicfeedpublic static String getMessageKey(Id.NotificationFeed feed)
feed.feed - Id.NotificationFeed to get the Kafka message key offeedpublic static Id.NotificationFeed getMessageFeed(String messageKey)
Id.NotificationFeed attached to a Kafka message containing a notification.messageKey - key of a Kafka message containing a NotificationId.NotificationFeed attached to a Kafka message containing a notificationCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.