Quantcast

Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

titou10
With Artemis 2.0, with this JMS code...

          Queue jmsQ = sessionJMS.createQueue("nonExistingQueue");
          TextMessage m = sessionJMS.createTextMessage();
          m.setText("whatever");
          try (MessageProducer p = sessionJMS.createProducer(jmsQ);) {
             p.send(m);
          }

...an address/queue (with routingType= ANYCAST) is created on the server but AFAIK, based on the JMS specs, none of the methods
called (createQueue(), createProducer(),send()) should do this !

The address/queue is "visible" when calling getAddress() on ResourceName.BROKER via the management API, even after the server is restart

Not sure what method exactly creates the address/queue but from the JMS specs, for the Session:createQueue() method it is said:

    "...Note that this method simply creates an object that encapsulates the name of a queue. It does not create the physical queue
in the JMS provider"

In fact, it seems that this the createProducer() method that creates the address/queue...

Also with this definition in broker.xml (From the documentation, chapter "Address  Model"):
    <address name="address.foo">
       <anycast>
         <queue name="q1"/>
       </anycast>
    </address>

The following code

          Queue jmsQ = sessionJMS.createQueue("q1");
          TextMessage m = sessionJMS.createTextMessage();
          m.setText("whatever");
          try (MessageProducer p = sessionJMS.createProducer(jmsQ);) {
             p.send(m);
          }

fails on the createProducer() method with this exception:

ActiveMQQueueExistsException[errorType=QUEUE_EXISTS message=AMQ119019: Queue already exists q1]
     at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:412)
     at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:322)
     at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.createQueue(ActiveMQSessionContext.java:635)
     at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.internalCreateQueue(ClientSessionImpl.java:1836)
     at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.createQueue(ClientSessionImpl.java:389)
     at org.apache.activemq.artemis.jms.client.ActiveMQSession.createBrowser(ActiveMQSession.java:820)
     at org.apache.activemq.artemis.jms.client.ActiveMQSession.createBrowser(ActiveMQSession.java:782)

This may be related to the "auto-create-jms-queues" and "auto-create-jms-topics" settings, mut IMHO this seems to break JMS specs
and in the second case it should not try to create tyhe address/queue it it already exists..


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

titou10
FYI, same code to an IBM MQ server fails as expected with an "UNKNOWN_OBJECT_NAME" on the createProducer() method

com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
        at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1248) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1205) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.access$800(WMQMessageProducer.java:75) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<init>(WMQMessageProducer.java:1181) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQSession.createProducer(WMQSession.java:1077) ~[na:na]
        at com.ibm.msg.client.jms.internal.JmsSessionImpl.createProducer(JmsSessionImpl.java:1498) ~[na:na]
        at com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661) ~[na:na]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

andytaylor
This happens if you have auto create for queues/topics configured on the address settings, you can turn this off if you desire

On 31 March 2017 at 12:17, titou10 [via ActiveMQ] <[hidden email]> wrote:
FYI, same code to an IBM MQ server fails as expected with an "UNKNOWN_OBJECT_NAME" on the createProducer() method

com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
        at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1248) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1205) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.access$800(WMQMessageProducer.java:75) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<init>(WMQMessageProducer.java:1181) ~[na:na]
        at com.ibm.msg.client.wmq.internal.WMQSession.createProducer(WMQSession.java:1077) ~[na:na]
        at com.ibm.msg.client.jms.internal.JmsSessionImpl.createProducer(JmsSessionImpl.java:1498) ~[na:na]
        at com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661) ~[na:na]




To start a new topic under ActiveMQ - User, email [hidden email]
To unsubscribe from ActiveMQ - User, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

titou10
OK...

I'm not sure that setting the server in this mode respects the JMS specs...maybe it may be considered as a JMS extension?

And what about the ActiveMQQueueExistsException[errorType=QUEUE_EXISTS message=AMQ119019: Queue already exists q1]exception for the
second case ?


Le 31/03/2017 à 07:51, andytaylor a écrit :

> This happens if you have auto create for queues/topics configured on the
> address settings, you can turn this off if you desire
>
> On 31 March 2017 at 12:17, titou10 [via ActiveMQ] <
> [hidden email]> wrote:
>
>> FYI, same code to an IBM MQ server fails as expected with an
>> "UNKNOWN_OBJECT_NAME" on the createProducer() method
>>
>> com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2'
>> ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
>>          at com.ibm.msg.client.wmq.common.internal.Reason.
>> createException(Reason.java:203) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>> checkJmqiCallSuccess(WMQMessageProducer.java:1248) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>> checkJmqiCallSuccess(WMQMessageProducer.java:1205) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>> access$800(WMQMessageProducer.java:75) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer$
>> SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801)
>> ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<
>> init>(WMQMessageProducer.java:1181) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQSession.
>> createProducer(WMQSession.java:1077) ~[na:na]
>>          at com.ibm.msg.client.jms.internal.JmsSessionImpl.
>> createProducer(JmsSessionImpl.java:1498) ~[na:na]
>>          at com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661)
>> ~[na:na]
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-
>> seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-
>> tp4724415p4724416.html
>> To start a new topic under ActiveMQ - User, email
>> [hidden email]
>> To unsubscribe from ActiveMQ - User, click here
>> <
>> .
>> NAML
>> <
http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-tp4724415p4724418.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

andytaylor
It does adhere to the JMS spec, the destinations are just created dynamically not explicitly because of the call.NB mos vendors do this

For the second exception, this is because you send to an address not a queue, so it tries to create a new queue under the address q1 which fails because it already exists under address address.foo

On 31 March 2017 at 13:05, titou10 [via ActiveMQ] <[hidden email]> wrote:
OK...

I'm not sure that setting the server in this mode respects the JMS specs...maybe it may be considered as a JMS extension?

And what about the ActiveMQQueueExistsException[errorType=QUEUE_EXISTS message=AMQ119019: Queue already exists q1]exception for the
second case ?


Le 31/03/2017 à 07:51, andytaylor a écrit :

> This happens if you have auto create for queues/topics configured on the
> address settings, you can turn this off if you desire
>
> On 31 March 2017 at 12:17, titou10 [via ActiveMQ] <
> [hidden email]> wrote:
>
>> FYI, same code to an IBM MQ server fails as expected with an
>> "UNKNOWN_OBJECT_NAME" on the createProducer() method
>>
>> com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2'
>> ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
>>          at com.ibm.msg.client.wmq.common.internal.Reason.
>> createException(Reason.java:203) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>> checkJmqiCallSuccess(WMQMessageProducer.java:1248) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>> checkJmqiCallSuccess(WMQMessageProducer.java:1205) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>> access$800(WMQMessageProducer.java:75) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer$
>> SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801)
>> ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<
>> init>(WMQMessageProducer.java:1181) ~[na:na]
>>          at com.ibm.msg.client.wmq.internal.WMQSession.
>> createProducer(WMQSession.java:1077) ~[na:na]
>>          at com.ibm.msg.client.jms.internal.JmsSessionImpl.
>> createProducer(JmsSessionImpl.java:1498) ~[na:na]
>>          at com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661)
>> ~[na:na]
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-
>> seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-
>> tp4724415p4724416.html
>> To start a new topic under ActiveMQ - User, email
>> [hidden email]
>> To unsubscribe from ActiveMQ - User, click here
>> <
>> .
>> NAML
>> <
http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-tp4724415p4724418.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h35@n4.nabble.com
To unsubscribe from ActiveMQ - User, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

titou10
I must admit I'm lost here..

The example is from https://activemq.apache.org/artemis/docs/2.0.0/address-model.html, section "Point-to-Point Address multiple
Queues" and there is no question about Topics here

Do you say that q1 is a Topic from a JMS perspective, even if it is attached to an "ANYCAST" Address?

Quoting the section "Mapping JMS Concepts to the Core API"

"A JMS topic is implemented in core as an address with name=(the topic name) and with a MULTICAST routing type with zero or more
queues bound to it. Each queue bound to that address represents a topic subscription.Likewise, a JMS queue is implemented as an
address with name=(the JMS queue name) with an ANYCAST routing type assocatied with it."

Please help me understand the rules to determine if an "Artemis Address" is a JMS Topic or a JMS Queue and also how to determine if
an "Artemis Queue" is a JMS Topic or a JMS Queue because the definition above is either incomplete or the assumption on q1 are wrong

Thanks !




Le 31/03/2017 à 08:12, andytaylor a écrit :

> It does adhere to the JMS spec, the destinations are just created
> dynamically not explicitly because of the call.NB mos vendors do this
>
> For the second exception, this is because you send to an address not a
> queue, so it tries to create a new queue under the address q1 which fails
> because it already exists under address address.foo
>
> On 31 March 2017 at 13:05, titou10 [via ActiveMQ] <
> [hidden email]> wrote:
>
>> OK...
>>
>> I'm not sure that setting the server in this mode respects the JMS
>> specs...maybe it may be considered as a JMS extension?
>>
>> And what about the ActiveMQQueueExistsException[errorType=QUEUE_EXISTS
>> message=AMQ119019: Queue already exists q1]exception for the
>> second case ?
>>
>>
>> Le 31/03/2017 à 07:51, andytaylor a écrit :
>>
>>> This happens if you have auto create for queues/topics configured on the
>>> address settings, you can turn this off if you desire
>>>
>>> On 31 March 2017 at 12:17, titou10 [via ActiveMQ] <
>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4724421&i=0>>
>> wrote:
>>>> FYI, same code to an IBM MQ server fails as expected with an
>>>> "UNKNOWN_OBJECT_NAME" on the createProducer() method
>>>>
>>>> com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode
>> '2'
>>>> ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
>>>>           at com.ibm.msg.client.wmq.common.internal.Reason.
>>>> createException(Reason.java:203) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>>>> checkJmqiCallSuccess(WMQMessageProducer.java:1248) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>>>> checkJmqiCallSuccess(WMQMessageProducer.java:1205) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>>>> access$800(WMQMessageProducer.java:75) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer$
>>>> SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801)
>>>> ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<
>>>> init>(WMQMessageProducer.java:1181) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQSession.
>>>> createProducer(WMQSession.java:1077) ~[na:na]
>>>>           at com.ibm.msg.client.jms.internal.JmsSessionImpl.
>>>> createProducer(JmsSessionImpl.java:1498) ~[na:na]
>>>>           at com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661)
>>>> ~[na:na]
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>> discussion
>>>> below:
>>>> http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-
>>>> seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-
>>>> tp4724415p4724416.html
>>>> To start a new topic under ActiveMQ - User, email
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4724421&i=1>
>>>> To unsubscribe from ActiveMQ - User, click here
>>>> <
>>>> .
>>>> NAML
>>>> <http://activemq.2283324.n4.nabble.com/template/
>> NamlServlet.jtp?macro=macro_viewer&id=instant_html%
>> 21nabble%3Aemail.naml&base=nabble.naml.namespaces.
>> BasicNamespace-nabble.view.web.template.NabbleNamespace-
>> nabble.view.web.template.NodeNamespace&breadcrumbs=
>> notify_subscribers%21nabble%3Aemail.naml-instant_emails%
>> 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>> --
>>> View this message in context: http://activemq.2283324.n4.
>> nabble.com/Artemis-2-0-JMS-seems-to-create-an-address-queue-on-jmsSession-
>> createProducer-calls-tp4724415p4724418.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-
>> seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-
>> tp4724415p4724421.html
>> To start a new topic under ActiveMQ - User, email
>> [hidden email]
>> To unsubscribe from ActiveMQ - User, click here
>> <
>> .
>> NAML
>> <
http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-tp4724415p4724422.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

andytaylor
Im not sure I mentioned a topic, however for clarification jms queue = anycast and jms topic = multicast in general

On 31 March 2017 at 13:30, titou10 [via ActiveMQ] <[hidden email]> wrote:
I must admit I'm lost here..

The example is from https://activemq.apache.org/artemis/docs/2.0.0/address-model.html, section "Point-to-Point Address multiple
Queues" and there is no question about Topics here

Do you say that q1 is a Topic from a JMS perspective, even if it is attached to an "ANYCAST" Address?

Quoting the section "Mapping JMS Concepts to the Core API"

"A JMS topic is implemented in core as an address with name=(the topic name) and with a MULTICAST routing type with zero or more
queues bound to it. Each queue bound to that address represents a topic subscription.Likewise, a JMS queue is implemented as an
address with name=(the JMS queue name) with an ANYCAST routing type assocatied with it."

Please help me understand the rules to determine if an "Artemis Address" is a JMS Topic or a JMS Queue and also how to determine if
an "Artemis Queue" is a JMS Topic or a JMS Queue because the definition above is either incomplete or the assumption on q1 are wrong

Thanks !




Le 31/03/2017 à 08:12, andytaylor a écrit :

> It does adhere to the JMS spec, the destinations are just created
> dynamically not explicitly because of the call.NB mos vendors do this
>
> For the second exception, this is because you send to an address not a
> queue, so it tries to create a new queue under the address q1 which fails
> because it already exists under address address.foo
>
> On 31 March 2017 at 13:05, titou10 [via ActiveMQ] <
> [hidden email]> wrote:

>
>> OK...
>>
>> I'm not sure that setting the server in this mode respects the JMS
>> specs...maybe it may be considered as a JMS extension?
>>
>> And what about the ActiveMQQueueExistsException[errorType=QUEUE_EXISTS
>> message=AMQ119019: Queue already exists q1]exception for the
>> second case ?
>>
>>
>> Le 31/03/2017 à 07:51, andytaylor a écrit :
>>
>>> This happens if you have auto create for queues/topics configured on the
>>> address settings, you can turn this off if you desire
>>>
>>> On 31 March 2017 at 12:17, titou10 [via ActiveMQ] <
>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4724421&i=0>>
>> wrote:

>>>> FYI, same code to an IBM MQ server fails as expected with an
>>>> "UNKNOWN_OBJECT_NAME" on the createProducer() method
>>>>
>>>> com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode
>> '2'
>>>> ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
>>>>           at com.ibm.msg.client.wmq.common.internal.Reason.
>>>> createException(Reason.java:203) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>>>> checkJmqiCallSuccess(WMQMessageProducer.java:1248) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>>>> checkJmqiCallSuccess(WMQMessageProducer.java:1205) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.
>>>> access$800(WMQMessageProducer.java:75) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer$
>>>> SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801)
>>>> ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQMessageProducer.<
>>>> init>(WMQMessageProducer.java:1181) ~[na:na]
>>>>           at com.ibm.msg.client.wmq.internal.WMQSession.
>>>> createProducer(WMQSession.java:1077) ~[na:na]
>>>>           at com.ibm.msg.client.jms.internal.JmsSessionImpl.
>>>> createProducer(JmsSessionImpl.java:1498) ~[na:na]
>>>>           at com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661)
>>>> ~[na:na]
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>> discussion
>>>> below:
>>>> http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-
>>>> seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-
>>>> tp4724415p4724416.html
>>>> To start a new topic under ActiveMQ - User, email
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4724421&i=1>
>>>> To unsubscribe from ActiveMQ - User, click here

>>>> <
>>>> .
>>>> NAML
>>>> <http://activemq.2283324.n4.nabble.com/template/
>> NamlServlet.jtp?macro=macro_viewer&id=instant_html%
>> 21nabble%3Aemail.naml&base=nabble.naml.namespaces.
>> BasicNamespace-nabble.view.web.template.NabbleNamespace-
>> nabble.view.web.template.NodeNamespace&breadcrumbs=
>> notify_subscribers%21nabble%3Aemail.naml-instant_emails%
>> 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>> --
>>> View this message in context: http://activemq.2283324.n4.
>> nabble.com/Artemis-2-0-JMS-seems-to-create-an-address-queue-on-jmsSession-
>> createProducer-calls-tp4724415p4724418.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-
>> seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-
>> tp4724415p4724421.html
>> To start a new topic under ActiveMQ - User, email
>> [hidden email]
>> To unsubscribe from ActiveMQ - User, click here
>> <

>> .
>> NAML
>> <
http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-2-0-JMS-seems-to-create-an-address-queue-on-jmsSession-createProducer-calls-tp4724415p4724422.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.




To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h35@n4.nabble.com
To unsubscribe from ActiveMQ - User, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

titou10
andytaylor wrote
Im not sure I mentioned a topic, however for clarification jms queue = anycast and jms topic = multicast in general
OK. q1 = "anycast" in this case, so it should be a JMS queue, right? The doc with this example says it is a queue, not a topic nor an alias...
andytaylor wrote
> > For the second exception, this is because you send to an address not a queue, so it tries to create a new queue under the address q1 which fails because it already exists under address address.foo

With this in broker.xml:

   <address name="orders">
      <anycast>
        <queue name="orders"/>
      </anycast>
   <address name="pubsub.foo">
      <multicast/>
   </address>
   <address name="address.foo">
      <anycast>
        <queue name="q1"/>
      </anycast>
   </address>

From a client, using the "activemq.management" queue,

Calling ResourceNames.BROKER::queueNames returns this list of queues:

- orders
  -> JMS createQueue + createProducer + createBrowser = OK
- q1
  -> JMS createProducer fails with "ActiveMQQueueExistsException: AMQ119019: Queue already exists q1"
- 1358977c-57dd-4e29-9a3d-65200f437c44
  -> Temporary queue
  -> JMS createQueue + createProducer + createBrowser = seems OK
  -> Sometime calling ResourceNames.QUEUE::messageCount fails with the following exception (Another problem I guess):
  java.lang.IndexOutOfBoundsException: readerIndex(19) + length(1) exceeds writerIndex(19): UnpooledDuplicatedByteBuf(ridx: 19, widx: 19, cap: 260, unwrapped: UnpooledUnsafeHeapByteBuf(ridx: 0, widx: 260, cap: 260))

Q: how do I distinguish here between
- queues that directly map to "JMS queues" like "orders"
- queues which are "adresses but not queues" (quoting you) like "q1"
- others queues like "1358..." that seems to act like a regular "JMS queues" but do not respond well to some admin commands
 

Calling ResourceNames.BROKER::addressNames returns this list of addresses:

- pubsub.foo deliveryMode ["MULTICAST"] queues:[]
  -> JMS createTopic + createProducer + MessageConsumer.setMessageListener = OK
- orders deliveryMode ["ANYCAST"] queues:[orders]
  -> JMS createQueue + createProducer + createBrowser = OK
- address.foo deliveryMode: ["ANYCAST"] queues: [q1]
  -> JMS createQueue + createProducer = OK
  -> JMS createBrowser fails with "ActiveMQNonExistentQueueException: AMQ119017: Queue address.foo does not exist"
  -> JMS createTopic + createProducer + MessageConsumer.setMessageListener = OK
  -> so it acts like a Topic even if deliveryMode=ANYCAST!
- 1358977c-57dd-4e29-9a3d-65200f437c44 deliveryMode: ["ANYCAST"] queues: [1358977c-57dd-4e29-9a3d-65200f437c44] temporary
  -> see above

To summarize.

- what Artemis "objects" map to JMS queues?
  -> the "queues" returned by ResourceNames.BROKER::queueNames
  -> ...except the ones like "q1". how to distinguish those ones ??
- what Artemis "objects" map to JMS topics?
  -> the "addresses" returned by ResourceNames.BROKER::addressNames with deliveryMode=MULTICAST
  -> some "addresses" returned by ResourceNames.BROKER::addressNames with deliveryMode=ANYCAST like "address.foo" above.
     -> how to distinguish the one in that category ??

Is that correct?  

Thanks
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.0: JMS seems to create an address/queue on jmsSession.createProducer() calls

andytaylor
nothing directly maps to JMS objects at the broker side, the addressing schema is generic to be multi protocol, all of the JMS bits are just a facade at the client. But in essence a message is sent to an address, if its anycast it will pick 1 queue and if it is multicast it sends to all the queues. In short a jms queue is:

<address name="myQueue">
            <anycast>
               <queue name="myQueue"/>
            </anycast>
         </address>

and a JMS topic is:

<address name="myTopic">
            <multicast/>
         </address>

From a consumer pov the protol decides how how it will consume, for JMS Durable Subscriptions for example it will create a queue using its client id as the queue name, for AMQP its similar.



On 1 April 2017 at 14:14, titou10 [via ActiveMQ] <[hidden email]> wrote:
andytaylor wrote
Im not sure I mentioned a topic, however for clarification jms queue = anycast and jms topic = multicast in general
OK. q1 = "anycast" in this case, so it should be a JMS queue, right? The doc with this example says it is a queue, not a topic nor an alias...
andytaylor wrote
> > For the second exception, this is because you send to an address not a queue, so it tries to create a new queue under the address q1 which fails because it already exists under address address.foo

With this in broker.xml:

   <address name="orders">
      <anycast>
        <queue name="orders"/>
      </anycast>
   <address name="pubsub.foo">
      <multicast/>
   </address>
   <address name="address.foo">
      <anycast>
        <queue name="q1"/>
      </anycast>
   </address>

From a client, using the "activemq.management" queue,

Calling ResourceNames.BROKER::queueNames returns this list of queues:

- orders
  -> JMS createQueue + createProducer + createBrowser = OK
- q1
  -> JMS createProducer fails with "ActiveMQQueueExistsException: AMQ119019: Queue already exists q1"
- 1358977c-57dd-4e29-9a3d-65200f437c44
  -> Temporary queue
  -> JMS createQueue + createProducer + createBrowser = seems OK
  -> Sometime calling ResourceNames.QUEUE::messageCount fails with the following exception (Another problem I guess):
  java.lang.IndexOutOfBoundsException: readerIndex(19) + length(1) exceeds writerIndex(19): UnpooledDuplicatedByteBuf(ridx: 19, widx: 19, cap: 260, unwrapped: UnpooledUnsafeHeapByteBuf(ridx: 0, widx: 260, cap: 260))

Q: how do I distinguish here between
- queues that directly map to "JMS queues" like "orders"
- queues which are "adresses but not queues" (quoting you) like "q1"
- others queues like "1358..." that seems to act like a regular "JMS queues" but do not respond well to some admin commands
 

Calling ResourceNames.BROKER::addressNames returns this list of addresses:

- pubsub.foo deliveryMode ["MULTICAST"] queues:[]
  -> JMS createTopic + createProducer + MessageConsumer.setMessageListener = OK
- orders deliveryMode ["ANYCAST"] queues:[orders]
  -> JMS createQueue + createProducer + createBrowser = OK
- address.foo deliveryMode: ["ANYCAST"] queues: [q1]
  -> JMS createQueue + createProducer = OK
  -> JMS createBrowser fails with "ActiveMQNonExistentQueueException: AMQ119017: Queue address.foo does not exist"
  -> JMS createTopic + createProducer + MessageConsumer.setMessageListener = OK
  -> so it acts like a Topic even if deliveryMode=ANYCAST!
- 1358977c-57dd-4e29-9a3d-65200f437c44 deliveryMode: ["ANYCAST"] queues: [1358977c-57dd-4e29-9a3d-65200f437c44] temporary
  -> see above

To summarize.

- what Artemis "objects" map to JMS queues?
  -> the "queues" returned by ResourceNames.BROKER::queueNames
  -> ...except the ones like "q1". how to distinguish those ones ??
- what Artemis "objects" map to JMS topics?
  -> the "addresses" returned by ResourceNames.BROKER::addressNames with deliveryMode=MULTICAST
  -> some "addresses" returned by ResourceNames.BROKER::addressNames with deliveryMode=ANYCAST like "address.foo" above.
     -> how to distinguish the one in that category ??

Is that correct?  

Thanks
 



To start a new topic under ActiveMQ - User, email [hidden email]
To unsubscribe from ActiveMQ - User, click here.
NAML

Loading...