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 Type
    Method
    Description
    void
    createQueue(javax.jms.Queue queue, int partitions, boolean enableFilters, String selector)
    Create a new Pulsar topic and set-up it as a Queue.
    void
    createSubscription(javax.jms.Topic destination, String subscriptionName, boolean enableFilters, String selector, boolean fromBeginning)
    Create a Subscription on a JMS Topic.
    void
    createTopic(javax.jms.Topic topic, int partitions)
    Create a new Pulsar topic.
    describe(javax.jms.Destination destination)
    Describe a Destination.
    javax.jms.Queue
    Get the handle to a Queue.
    javax.jms.Topic
    Get the handle to a Topic.
    void
    setQueueSubscriptionSelector(javax.jms.Queue destination, boolean enableFilters, String selector)
    Set the filter on a Queue.
    void
    setSubscriptionSelector(javax.jms.Topic destination, String subscriptionName, boolean enableFilters, String selector)
    Set the filter on a subscription on a Topic.
  • Method Details

    • getQueue

      javax.jms.Queue getQueue(String queue) throws javax.jms.JMSException
      Get the handle to a Queue. A Session.createQueue(String) this method does not fail in case the destination doesn't exist.
      Parameters:
      queue -
      Returns:
      the handle
      Throws:
      javax.jms.JMSException
    • getTopic

      javax.jms.Topic getTopic(String topic) throws javax.jms.JMSException
      Get the handle to a Topic. A Session.createQueue(String) this method does not fail in case the destination doesn't exist.
      Parameters:
      topic -
      Returns:
      the handle
      Throws:
      javax.jms.JMSException
    • describe

      JMSDestinationMetadata describe(javax.jms.Destination destination) throws javax.jms.JMSException
      Describe a Destination. This method always returns a description, even if the physical Pulsar topic does not exist. Please check JMSDestinationMetadata.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 destination
      partitions - the number of partitions, 0 to create a non-partitioned topic
      enableFilters - enable the filters
      selector - 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 destination
      partitions - 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 destination
      enableFilters - enable the filters
      selector - 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 destination
      subscriptionName - the subscription name
      enableFilters - enable the filters
      selector - the selector
      fromBeginning - 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 destination
      subscriptionName - the subscription name
      enableFilters - enable the filters
      selector - the selector
      Throws:
      javax.jms.JMSException