public interface MessagingService
| Modifier and Type | Method and Description |
|---|---|
void |
createTopic(TopicMetadata topicMetadata)
Creates a topic with the given metadata.
|
void |
deleteTopic(co.cask.cdap.proto.id.TopicId topicId)
Deletes a topic
|
TopicMetadata |
getTopic(co.cask.cdap.proto.id.TopicId topicId)
Returns the metadata of the given topic.
|
List<co.cask.cdap.proto.id.TopicId> |
listTopics(co.cask.cdap.proto.id.NamespaceId namespaceId)
Returns the list of topics available under the given namespace.
|
MessageFetcher |
prepareFetch(co.cask.cdap.proto.id.TopicId topicId)
Prepares to fetch messages from the given topic.
|
RollbackDetail |
publish(StoreRequest request)
Publishes a list of messages to the messaging system.
|
void |
rollback(co.cask.cdap.proto.id.TopicId topicId,
RollbackDetail rollbackDetail)
Rollbacks messages published to the given topic with the given transaction.
|
void |
storePayload(StoreRequest request)
Stores a list of messages to the messaging system.
|
void |
updateTopic(TopicMetadata topicMetadata)
Updates the metadata of a topic.
|
void createTopic(TopicMetadata topicMetadata) throws co.cask.cdap.api.messaging.TopicAlreadyExistsException, IOException
topicMetadata - topic to be createdco.cask.cdap.api.messaging.TopicAlreadyExistsException - if the topic to be created already existIOException - if failed to create the topicServiceUnavailableException - if the messaging service is not availablevoid updateTopic(TopicMetadata topicMetadata) throws co.cask.cdap.api.messaging.TopicNotFoundException, IOException
topicMetadata - the topic metadata to be updatedco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to update the topic metadataServiceUnavailableException - if the messaging service is not availablevoid deleteTopic(co.cask.cdap.proto.id.TopicId topicId)
throws co.cask.cdap.api.messaging.TopicNotFoundException,
IOException
topicId - the topic to be deletedco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to delete the topicServiceUnavailableException - if the messaging service is not availableTopicMetadata getTopic(co.cask.cdap.proto.id.TopicId topicId) throws co.cask.cdap.api.messaging.TopicNotFoundException, IOException
topicId - message topicTopicMetadata of the given topic.co.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to retrieve topic metadata.ServiceUnavailableException - if the messaging service is not availableList<co.cask.cdap.proto.id.TopicId> listTopics(co.cask.cdap.proto.id.NamespaceId namespaceId) throws IOException
namespaceId - the namespace to list topics under itList of TopicId.IOException - if failed to retrieve topics.ServiceUnavailableException - if the messaging service is not availableMessageFetcher prepareFetch(co.cask.cdap.proto.id.TopicId topicId) throws co.cask.cdap.api.messaging.TopicNotFoundException, IOException
topicId - the topic to fetch message fromMessageFetcher for setting up parameters for fetching messages from the messaging systemco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to fetch messagesServiceUnavailableException - if the messaging service is not available@Nullable RollbackDetail publish(StoreRequest request) throws co.cask.cdap.api.messaging.TopicNotFoundException, IOException
request - the StoreRequest containing messages to be publishedRollbackDetail containing
information for rollback; otherwise null will be returned.co.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to publish messagesServiceUnavailableException - if the messaging service is not availablevoid storePayload(StoreRequest request) throws co.cask.cdap.api.messaging.TopicNotFoundException, IOException
request - the StoreRequest containing messages to be storedco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to store messagesServiceUnavailableException - if the messaging service is not availablevoid rollback(co.cask.cdap.proto.id.TopicId topicId,
RollbackDetail rollbackDetail)
throws co.cask.cdap.api.messaging.TopicNotFoundException,
IOException
topicId - the topic where the messages were published underrollbackDetail - the RollbackDetail as returned by the
publish(StoreRequest) call,
which contains information needed for the rollbackco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to rollback changesServiceUnavailableException - if the messaging service is not availableCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.