Package org.activemq.message

Examples of org.activemq.message.ActiveMQTopic


        requestorConnection = fac2.createTopicConnection();
        requestorConnection.setClientID("requestor");
        String destinationName = getClass().getName();
       
      
        destination = new ActiveMQTopic(destinationName);
        requestorConnection.start();
              
       
        Session s = serverConnection.createSession(false,Session.AUTO_ACKNOWLEDGE);
        MessageConsumer mc = s.createConsumer(destination);
View Full Code Here


        return new ActiveMQMessage();
    }

    protected Destination createDestination(String subject) {
        if (topic) {
            return new ActiveMQTopic(subject);
        }
        else {
            return new ActiveMQQueue(subject);
        }
    }
View Full Code Here

    protected JabberWireFormat format = new JabberWireFormat();

    public void testWrite() throws Exception {
        ActiveMQTextMessage message = new ActiveMQTextMessage();
        //message.setJMSType("id");
        message.setJMSReplyTo(new ActiveMQTopic("my.source"));
        message.setJMSDestination(new ActiveMQTopic("my.target"));
        message.setJMSCorrelationID("abc123");
        message.setText("hello there");

        StringWriter buffer = new StringWriter();
        PrintWriter out = new PrintWriter(buffer);
View Full Code Here

        ActiveMQActivationSpec activationSpec = endpointActivationKey.getActivationSpec();
        if ("javax.jms.Queue".equals(activationSpec.getDestinationType())) {
            dest = new ActiveMQQueue(activationSpec.getDestination());
        } else if ("javax.jms.Topic".equals(activationSpec.getDestinationType())) {
            dest = new ActiveMQTopic(activationSpec.getDestination());
        } else {
            throw new ResourceException("Unknown destination type: " + activationSpec.getDestinationType());
        }
    }
View Full Code Here

    protected int prefetchValue = 10000000;

    protected Destination createDestination() {
        String subject = getClass().getName();
        if (isTopic) {
            return new ActiveMQTopic(subject);
        }
        else {
            return new ActiveMQQueue(subject);
        }
    }
View Full Code Here

       
        ActiveMQDestination dest = null;
        if (Queue.class.getName().equals(destinationType)) {
            dest = new ActiveMQQueue(destination);
        } else if (Topic.class.getName().equals(destinationType)) {
            dest = new ActiveMQTopic(destination);
        } else {
            assert false : "Execution should never reach here";
        }
        return dest;
    }
View Full Code Here

     * @throws JMSException if the session fails to create a topic due to some internal error.
     * @since 1.1
     */
    public Topic createTopic(String topicName) throws JMSException {
        checkClosed();
        return new ActiveMQTopic(topicName);
    }
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();
    this.jmsMessageID = "testid";
    this.jmsClientID = "testclientid";
    this.jmsCorrelationID = "testcorrelationid";
    this.jmsDestination = new ActiveMQTopic("test.topic");
    this.jmsReplyTo = new ActiveMQTemporaryTopic("test.replyto.topic");
    this.jmsDeliveryMode = DeliveryMode.NON_PERSISTENT;
    this.jmsRedelivered = true;
    this.jmsType = "test type";
    this.jmsExpiration = 100000;
View Full Code Here

     */
    protected void setUp() throws Exception {
        super.setUp();
        this.id = 3445;
        this.clientId = "testclientId";
        this.destination = new ActiveMQTopic("testtopic");
        this.startTime = System.currentTimeMillis();
        this.started = true;
    }
View Full Code Here

        if (started.commit(false, true)) {
           
            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
           
            String advisoryName = ActiveMQDestination.CONNECTION_ADVISORY_PREFIX;
            Destination advisoryDestination = new ActiveMQTopic(advisoryName);
            MessageConsumer consumer = session.createConsumer(advisoryDestination);
            consumer.setMessageListener(this);
        }
    }
View Full Code Here

TOP

Related Classes of org.activemq.message.ActiveMQTopic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.