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
  




--
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-tp4724415p4724471.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to