activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Poznachowski (JIRA)" <>
Subject [jira] [Created] (ARTEMIS-330) Unable to create Topic via Session object
Date Wed, 23 Dec 2015 12:26:46 GMT
Grzegorz Poznachowski created ARTEMIS-330:

             Summary: Unable to create Topic via Session object
                 Key: ARTEMIS-330
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
    Affects Versions: 1.1.0
         Environment: Ubuntu 15.10, JDK 8
            Reporter: Grzegorz Poznachowski

Running code as simple as:

public static void main(final String[] args) throws Exception {
        TransportConfiguration transport = new TransportConfiguration(NettyConnectorFactory.class.getName(),
new HashMap<>());
        ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
        Connection connection = cf.createConnection();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = session.createQueue("someQueue");
        MessageProducer producer = session.createProducer(queue);

would result in creating Queue on the server. However it is not possible to the same for topic:
       Topic topic = session.createTopic("someTopic");
       MessageProducer producer = session.createProducer(topic);
would result in an error:
Exception in thread "main" javax.jms.InvalidDestinationException: Destination exampleTopic
does not exist
	at org.apache.activemq.artemis.jms.client.ActiveMQSession.createProducer(
	at org.apache.activemq.artemis.jms.example.TopicExample.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.intellij.rt.execution.application.AppMain.main(

This message was sent by Atlassian JIRA

View raw message