com.ibm.mq.jms

Class MQTopicPublisher

    • Method Detail

      • getTopic

        public javax.jms.Topic getTopic()
                                 throws javax.jms.JMSException
        Gets the topic associated with this publisher.
        Specified by:
        getTopic in interface javax.jms.TopicPublisher
        Returns:
        this publisher's topic
        Throws:
        javax.jms.JMSException - if JMS fails to get topic for this topic publisher due to some internal error
      • publish

        public void publish(javax.jms.Message message)
                     throws javax.jms.JMSException
        Publishes a message to the topic. Uses the topic publisher's default delivery mode, priority, and time to live.
        Specified by:
        publish in interface javax.jms.TopicPublisher
        Parameters:
        message - the message to publish.
        Throws:
        javax.jms.JMSException - if the publisher fails to publish the message due to an internal error.
      • publish

        public void publish(javax.jms.Message message,
                            int deliveryMode,
                            int priority,
                            long timeToLive)
                     throws javax.jms.JMSException
        Publishes a message to the topic, specifying delivery mode, priority, and time to live.
        Specified by:
        publish in interface javax.jms.TopicPublisher
        Parameters:
        message - the message to publish
        deliveryMode - the delivery mode to use
        priority - the priority for this message
        timeToLive - the message's lifetime (in milliseconds)
        Throws:
        javax.jms.JMSException - if the publisher fails to publish the message due to an internal error.
      • publish

        public void publish(javax.jms.Topic topic,
                            javax.jms.Message message)
                     throws javax.jms.JMSException
        Publishes a message to a topic for an unidentified message producer. Uses the topic publisher's default delivery mode, priority, and time to live.
        Specified by:
        publish in interface javax.jms.TopicPublisher
        Parameters:
        topic - the topic to publish this message to
        message - - the message to publish
        Throws:
        javax.jms.JMSException - if the publisher fails to publish the message due to an internal error
      • publish

        public void publish(javax.jms.Topic topic,
                            javax.jms.Message message,
                            int deliveryMode,
                            int priority,
                            long timeToLive)
                     throws javax.jms.JMSException
        Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.
        Specified by:
        publish in interface javax.jms.TopicPublisher
        Parameters:
        topic - the topic to publish this message to.
        message - the message to publish
        deliveryMode - the delivery mode to use
        priority - the priority for this message
        timeToLive - the messages lifetime (in milliseconds)
        Throws:
        javax.jms.JMSException - if the publisher fails to publish the message due to an internal error.
(c) Copyright IBM Corp. 2008, 2016. All Rights Reserved.