You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2018/06/04 17:34:00 UTC
[jira] [Commented] (ARTEMIS-1906) anycastPrefix and multicastPrefix
should be kept in mapped addresses
[ https://issues.apache.org/jira/browse/ARTEMIS-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500577#comment-16500577 ]
Justin Bertram commented on ARTEMIS-1906:
-----------------------------------------
Changing the semantics of {{anycastPrefix}} and {{multicastPrefix}} would break the use-case for which they were originally implemented so I don't think that's a viable solution to the issue with your use-case.
However, I think you can solve your issue without using {{anycastPrefix}} or {{multicastPrefix}} at all. Instead I think you should try using address settings to control the routing types for auto-created addresses and queues. For example:
{code:xml}
<address-settings>
<address-setting match="/queue/#">
<default-address-routing-type>ANYCAST</default-address-routing-type>
<default-queue-routing-type>ANYCAST</default-queue-routing-type>
</address>
<address-setting match="/topic/#">
<default-address-routing-type>MULTICAST</default-address-routing-type>
<default-queue-routing-type>MULTICAST</default-queue-routing-type>
</address>
</address-settings>
<wildcard-addresses>
<delimiter>/</delimiter>
</wildcard-addresses>
{code}
By using this method rather that the prefixes the {{/queue/}} addresses would be 100% independent of the {{/topic/}} addresses which should solve your monitoring and security issues.
> anycastPrefix and multicastPrefix should be kept in mapped addresses
> --------------------------------------------------------------------
>
> Key: ARTEMIS-1906
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1906
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Lionel Cons
> Priority: Major
>
> For STOMP (at least), {{anycastPrefix}} and {{multicastPrefix}} are used to map destinations to addresses and routing types.
> In order to have compatibility with other brokers such as ActiveMQ 5 or RabbitMQ, these prefixes must be set to {{anycastPrefix=/queue/}} and {{multicastPrefix=/topic/}}. With these settings, a destination like {{/queue/foo}} works like a JMS queue while {{/topic/foo}} works like a JMS topic. So far, so good.
> Unfortunately, the current implementation removes these prefixes when mapping to addresses. This means that the two (completely unrelated, see ARTEMIS-1794) destinations {{/queue/foo}} and {{/topic/foo}} map to the exact same address named {{foo}}. Messaging does work as expected because the same address can have multiple routing types but monitoring and security become problematic.
> Security is defined per address so the two destinations {{/queue/foo}} and {{/topic/foo}} cannot have different security settings.
> Similarly, some monitoring information is attached to the address objects so {{/queue/foo}} and {{/topic/foo}} cannot have different monitoring metrics.
> It seems all these problems would disappear if prefixes would be kept when mapping STOMP destinations to addresses.
> Note: similar problems might exist with other protocols but I've tested it only using STOMP.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)