Package com.datastax.oss.pulsar.jms.api
Interface JMSAdmin
public interface JMSAdmin
Admin API for JMS features. This is meant to be like an extension of the PulsarAdmin Java API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateQueue(javax.jms.Queue queue, int partitions, boolean enableFilters, String selector) Create a new Pulsar topic and set-up it as a Queue.voidcreateSubscription(javax.jms.Topic destination, String subscriptionName, boolean enableFilters, String selector, boolean fromBeginning) Create a Subscription on a JMS Topic.voidcreateTopic(javax.jms.Topic topic, int partitions) Create a new Pulsar topic.describe(javax.jms.Destination destination) Describe a Destination.javax.jms.QueueGet the handle to a Queue.javax.jms.TopicGet the handle to a Topic.voidsetQueueSubscriptionSelector(javax.jms.Queue destination, boolean enableFilters, String selector) Set the filter on a Queue.voidsetSubscriptionSelector(javax.jms.Topic destination, String subscriptionName, boolean enableFilters, String selector) Set the filter on a subscription on a Topic.
-
Method Details
-
getQueue
Get the handle to a Queue. ASession.createQueue(String)this method does not fail in case the destination doesn't exist.- Parameters:
queue-- Returns:
- the handle
- Throws:
javax.jms.JMSException
-
getTopic
Get the handle to a Topic. ASession.createQueue(String)this method does not fail in case the destination doesn't exist.- Parameters:
topic-- Returns:
- the handle
- Throws:
javax.jms.JMSException
-
describe
Describe a Destination. This method always returns a description, even if the physical Pulsar topic does not exist. Please checkJMSDestinationMetadata.PhysicalPulsarTopicMetadata.isExists())- Parameters:
destination- the destination- Returns:
- Depending on the destination type this function returns * one of the subclasses of
JMSDestinationMetadata - Throws:
javax.jms.JMSException- See Also:
-
createQueue
void createQueue(javax.jms.Queue queue, int partitions, boolean enableFilters, String selector) throws javax.jms.JMSException Create a new Pulsar topic and set-up it as a Queue. A JMS Queue maps to a Pulsar Subscription. Create the topic if it does not exist. Create the subscription if it does not exit. If the topic already exists the API fails in case it doesn't match the expected number of partitions. If the subscription already exists an error is thrown.- Parameters:
queue- the destinationpartitions- the number of partitions, 0 to create a non-partitioned topicenableFilters- enable the filtersselector- selector- Throws:
javax.jms.JMSException
-
createTopic
void createTopic(javax.jms.Topic topic, int partitions) throws javax.jms.JMSException Create a new Pulsar topic. A JMS Topic maps to a Pulsar Topic. Create the topic if it does not exist. If the topic already exists the API fails in case it doesn't match the expected number of partitions.- Parameters:
topic- the destinationpartitions- the number of partitions, 0 to create a non-partitioned topic- Throws:
javax.jms.JMSException
-
setQueueSubscriptionSelector
void setQueueSubscriptionSelector(javax.jms.Queue destination, boolean enableFilters, String selector) throws javax.jms.JMSException Set the filter on a Queue. The name of the subscription is defined by the Destination ("jms-queue" is the default name).- Parameters:
destination- the destinationenableFilters- enable the filtersselector- the selector- Throws:
javax.jms.JMSException
-
createSubscription
void createSubscription(javax.jms.Topic destination, String subscriptionName, boolean enableFilters, String selector, boolean fromBeginning) throws javax.jms.JMSException Create a Subscription on a JMS Topic.- Parameters:
destination- the destinationsubscriptionName- the subscription nameenableFilters- enable the filtersselector- the selectorfromBeginning- start the subscription from the beginning of the topic, otherwise it will start from the tail.- Throws:
javax.jms.JMSException- See Also:
-
setSubscriptionSelector
void setSubscriptionSelector(javax.jms.Topic destination, String subscriptionName, boolean enableFilters, String selector) throws javax.jms.JMSException Set the filter on a subscription on a Topic.- Parameters:
destination- the destinationsubscriptionName- the subscription nameenableFilters- enable the filtersselector- the selector- Throws:
javax.jms.JMSException
-