public class CambriaHandler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARTITION_KEY |
Constructor and Description |
---|
CambriaHandler() |
Modifier and Type | Method and Description |
---|---|
void |
closeConsumer(com.att.nsa.cambria.client.CambriaConsumer consumer) |
com.att.nsa.cambria.client.CambriaConsumer |
createConsumer(Collection<String> hostSet,
String topicName,
String apiKey,
String secretKey,
String consumerId,
String consumerGroup,
int timeoutMS)
create and retrieve a Cambria Consumer for a specific topic
|
CambriaErrorResponse |
createTopic(Collection<String> hostSet,
String apiKey,
String secretKey,
String topicName,
int partitionCount,
int replicationCount)
create a topic if it does not exists in the topicsList
|
fj.data.Either<Iterable<String>,CambriaErrorResponse> |
fetchFromTopic(com.att.nsa.cambria.client.CambriaConsumer topicConsumer)
use the topicConsumer to fetch messages from topic.
|
CambriaErrorResponse |
getApiKey(String server,
String apiKey) |
fj.data.Either<Set<String>,CambriaErrorResponse> |
getTopics(List<String> hostSet)
retrieve all topics from U-EB server
|
CambriaErrorResponse |
registerToTopic(Collection<String> hostSet,
String topicName,
String managerApiKey,
String managerSecretKey,
String subscriberApiKey,
SubscriberTypeEnum subscriberTypeEnum)
register a public key (subscriberId) to a given topic as a CONSUMER or PRODUCER
|
CambriaErrorResponse |
sendNotification(String topicName,
String uebPublicKey,
String uebSecretKey,
List<String> uebServers,
INotificationData data)
Publish notification message to a given queue
|
CambriaErrorResponse |
sendNotificationAndClose(String topicName,
String uebPublicKey,
String uebSecretKey,
List<String> uebServers,
INotificationData data,
long waitBeforeCloseTimeout) |
CambriaErrorResponse |
unRegisterFromTopic(Collection<String> hostSet,
String topicName,
String managerApiKey,
String managerSecretKey,
String subscriberApiKey,
SubscriberTypeEnum subscriberTypeEnum) |
public static String PARTITION_KEY
public fj.data.Either<Set<String>,CambriaErrorResponse> getTopics(List<String> hostSet)
hostSet
- public CambriaErrorResponse createTopic(Collection<String> hostSet, String apiKey, String secretKey, String topicName, int partitionCount, int replicationCount)
hostSet
- - list of U-EB serversapiKey
- secretKey
- topicsList
- - list of exists topicstopicName
- - topic to createpartitionCount
- replicationCount
- public CambriaErrorResponse unRegisterFromTopic(Collection<String> hostSet, String topicName, String managerApiKey, String managerSecretKey, String subscriberApiKey, SubscriberTypeEnum subscriberTypeEnum)
public CambriaErrorResponse registerToTopic(Collection<String> hostSet, String topicName, String managerApiKey, String managerSecretKey, String subscriberApiKey, SubscriberTypeEnum subscriberTypeEnum)
hostSet
- topicName
- managerApiKey
- managerSecretKey
- subscriberApiKey
- subscriberTypeEnum
- public com.att.nsa.cambria.client.CambriaConsumer createConsumer(Collection<String> hostSet, String topicName, String apiKey, String secretKey, String consumerId, String consumerGroup, int timeoutMS) throws Exception
hostSet
- topicName
- apiKey
- secretKey
- consumerId
- consumerGroup
- timeoutMS
- Exception
public void closeConsumer(com.att.nsa.cambria.client.CambriaConsumer consumer)
public fj.data.Either<Iterable<String>,CambriaErrorResponse> fetchFromTopic(com.att.nsa.cambria.client.CambriaConsumer topicConsumer)
topicConsumer
- public CambriaErrorResponse sendNotification(String topicName, String uebPublicKey, String uebSecretKey, List<String> uebServers, INotificationData data)
topicName
- uebPublicKey
- uebSecretKey
- uebServers
- data
- public CambriaErrorResponse sendNotificationAndClose(String topicName, String uebPublicKey, String uebSecretKey, List<String> uebServers, INotificationData data, long waitBeforeCloseTimeout)
public CambriaErrorResponse getApiKey(String server, String apiKey)
Copyright © 2017. All rights reserved.