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] <
ml-node+s2283324n4724471...@n4.nabble.com> 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
>
>
>
> ------------------------------
> 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-
> tp4724415p4724471.html
> To start a new topic under ActiveMQ - User, email
> ml-node+s2283324n2341805...@n4.nabble.com
> To unsubscribe from ActiveMQ - User, click here
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=YW5keS50YXlsczY3QGdtYWlsLmNvbXwyMzQxODA1fC05MDE1NDk1MzM=>
> .
> 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-tp4724415p4724487.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to