Hi Justin,
Thank you very much for the clarification. That means if the RoutingType of
the address is MULTICAST then will it only support MULTICAST queues? If
there is a MULTICAST address and two ANYCAST queues are bound to this
address what should be the behavior on a Message that does not have any
routing type specified?
I quickly tried this by creating such a config as follows:
session.createAddress(new SimpleString("h"),
RoutingType.MULTICAST, true);
session.createQueue("h", RoutingType.ANYCAST, "i", true);
session.createQueue("h", RoutingType.ANYCAST, "j", true);
The messages seemed to go to the consumers for each of the queues in a
round robin fashion. Is it not wrong to attach an ANYCAST queue to a
MULTICAST address?
What should be the behavior if multiple consumers attach to a MULTICAST
queue? I noticed that this also gives raise to messages being routed in a
roundrobin fashion.
Thanks,
Riyafa
On Tue, 29 Jan 2019 at 18:42, Justin Bertram <[email protected]> wrote:
> Under the covers the routing type for an address indicates which kind of
> queues the address supports. The routing type of a queue indicates how
> messages should be routed from the address to the queue. The routing type
> can also be set on a message and that also determines how the message
> should be routed, e.g. a multicast message sent directly to an anycast
> queue will not actually be routed to that queue and vice versa. Also, if
> there are multiple types of queues on the same address messages without a
> routing type are routed differently than those with a routing type.
>
>
> Justin
>
> On Tue, Jan 29, 2019 at 5:09 AM Riyafa Abdul Hameed <[email protected]>
> wrote:
>
> > Hi,
> >
> > I am quite new to ActiveMQ Artemis core api and was trying out different
> > aspects and I couldn't find a purpose for specifying the RoutingType when
> > creating a queue:
> >
> > session.createAddress(new SimpleString("a"), RoutingType.MULTICAST,
> true);
> > session.createQueue("a", RoutingType.MULTICAST, "b", true);
> >
> > Whatever the RoutingType I mention for the createQueue function the
> queues
> > seem to behave in the same manner. I find that the behavior of the queues
> > are dependent on the RoutingType of the Address.
> >
> > Can someone please point out to me the purpose of the RoutingType for a
> > queue in Artemis or point out a documentation to me?
> >
> > Thank you.
> >
> > Faithfully,
> > Riyafa
> >
>