activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Poznachowski (JIRA)" <j...@apache.org>
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
                 URL: https://issues.apache.org/jira/browse/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:

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

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message