Examples of ActiveMQTempTopic


Examples of org.apache.activemq.command.ActiveMQTempTopic

            else {
                if (destination instanceof TemporaryQueue) {
                  activeMQDestination = new ActiveMQTempQueue(((Queue) destination).getQueueName());
                }
                else if (destination instanceof TemporaryTopic) {
                  activeMQDestination = new ActiveMQTempTopic(((Topic) destination).getTopicName());
                }
                else if (destination instanceof Queue) {
                  activeMQDestination = new ActiveMQQueue(((Queue) destination).getQueueName());
                }
                else if (destination instanceof Topic) {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    protected ActiveMQTempDestination createTempDestination(boolean topic) throws JMSException {

        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if (topic) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }

        DestinationInfo info = new DestinationInfo();
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    }

    public ActiveMQDestination createTempTopic(String name) {
        ActiveMQDestination rc = tempDestinations.get(name);
        if( rc == null ) {
            rc = new ActiveMQTempTopic(connectionId, tempDestinationGenerator.getNextSequenceId());
            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
            tempDestinations.put(name, rc);
            tempDestinationAmqToStompMap.put(rc.getQualifiedName(), name);
        }
        return rc;
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    protected ActiveMQTempDestination createTempDestination(boolean topic) throws JMSException {

        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if (topic) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }

        DestinationInfo info = new DestinationInfo();
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

        case TOPIC:
            return new ActiveMQTopic(name);
        case TEMP_QUEUE:
            return new ActiveMQTempQueue(name);
        case TEMP_TOPIC:
            return new ActiveMQTempTopic(name);
        default:   
            throw new IllegalArgumentException("Not in the valid destination format");
        }
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

  }

  public ActiveMQDestination createTempTopic(String name) {
        ActiveMQDestination rc = tempDestinations.get(name);
        if( rc == null ) {
            rc = new ActiveMQTempTopic(connectionId, tempDestinationGenerator.getNextSequenceId());
            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
            tempDestinations.put(name, rc);
            tempDestinationAmqToStompMap.put(rc.getQualifiedName(), name);
        }       
        return rc;
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

        case TOPIC:
            return new ActiveMQTopic(name);
        case TEMP_QUEUE:
            return new ActiveMQTempQueue(name);
        case TEMP_TOPIC:
            return new ActiveMQTempTopic(name);
        default:   
            throw new IllegalArgumentException("Not in the valid destination format");
        }
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

        super.setUp();
    }

    @Override
    protected void isValidDestination(Object header) {
        ActiveMQTempTopic destination = assertIsInstanceOf(ActiveMQTempTopic.class, header);
        LOG.info("Received message has a temporary topic: " + destination);
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

            ActiveMQConnectionFactory brokerAFactory = new ActiveMQConnectionFactory(item.broker.getTransportConnectorByScheme("tcp").getName()
                    + "?jms.watchTopicAdvisories=false");
            Connection connection = brokerAFactory.createConnection();
            connection.start();
            connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(
                    AdvisorySupport.getNoTopicConsumersAdvisoryTopic(new ActiveMQTempTopic(">"))).setMessageListener(new MessageListener() {
                @Override
                public void onMessage(Message message) {
                    sendsWithNoConsumers.incrementAndGet();
                }
            });
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

        defaultEntry.setSendAdvisoryIfNoConsumers(true);
        DeadLetterStrategy deadletterStrategy = new SharedDeadLetterStrategy();
        deadletterStrategy.setProcessNonPersistent(true);
        defaultEntry.setDeadLetterStrategy(deadletterStrategy);
        defaultEntry.setDispatchPolicy(new PriorityDispatchPolicy());
        map.put(new ActiveMQTempTopic(">"), defaultEntry);

        for (BrokerItem item : brokers.values()) {
            item.broker.setDestinationPolicy(map);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.