[
https://issues.apache.org/jira/browse/ARTEMIS-3113?focusedWorklogId=551204&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-551204
]
ASF GitHub Bot logged work on ARTEMIS-3113:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Feb/21 08:07
Start Date: 11/Feb/21 08:07
Worklog Time Spent: 10m
Work Description: michaelandrepearce commented on a change in pull
request #3450:
URL: https://github.com/apache/activemq-artemis/pull/3450#discussion_r574307737
##########
File path:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
##########
@@ -396,36 +371,54 @@ private static CoreMessage newMessage(long id, byte
messageType, CoreMessageObje
}
- public static byte destinationType(Destination destination) {
- if (destination instanceof Queue) {
- if (destination instanceof TemporaryQueue) {
- return TEMP_QUEUE_TYPE;
- } else {
- return QUEUE_TYPE;
- }
- } else if (destination instanceof Topic) {
- if (destination instanceof TemporaryTopic) {
- return TEMP_TOPIC_TYPE;
- } else {
- return TOPIC_TYPE;
- }
+ public static String toAddress(String destination) {
+
+ if (destination.startsWith(DestinationUtil.QUEUE_QUALIFIED_PREFIX)) {
+ return
destination.substring(DestinationUtil.QUEUE_QUALIFIED_PREFIX.length());
+ } else if
(destination.startsWith(DestinationUtil.TOPIC_QUALIFIED_PREFIX)) {
+ return
destination.substring(DestinationUtil.TOPIC_QUALIFIED_PREFIX.length());
+ } else if
(destination.startsWith(DestinationUtil.TEMP_QUEUE_QUALIFED_PREFIX)) {
+ return
destination.substring(DestinationUtil.TEMP_QUEUE_QUALIFED_PREFIX.length());
+ } else if
(destination.startsWith(DestinationUtil.TEMP_TOPIC_QUALIFED_PREFIX)) {
+ return
destination.substring(DestinationUtil.TEMP_TOPIC_QUALIFED_PREFIX.length());
+ } else {
+ return destination;
}
+ }
+ public static byte destinationType(String destination) {
+ if (destination.startsWith(QUEUE_QUALIFIED_PREFIX)) {
+ return QUEUE_TYPE;
+ }
+ if (destination.startsWith(TOPIC_QUALIFIED_PREFIX)) {
+ return TOPIC_TYPE;
+ }
+ if (destination.startsWith(TEMP_QUEUE_QUALIFED_PREFIX)) {
+ return TEMP_QUEUE_TYPE;
+ }
+ if (destination.startsWith(TEMP_TOPIC_QUALIFED_PREFIX)) {
+ return TEMP_TOPIC_TYPE;
+ }
return QUEUE_TYPE;
}
- public static Destination destination(byte destinationType, String address)
{
+ public static String destination(RoutingType destinationType, String
address) {
+ String prefix;
+
+ if (destinationType == null) {
+ destinationType = RoutingType.ANYCAST;
+ }
+
switch (destinationType) {
- case TEMP_QUEUE_TYPE:
- return new ActiveMQTemporaryQueue(address, null);
- case TEMP_TOPIC_TYPE:
- return new ActiveMQTemporaryTopic(address, null);
- case TOPIC_TYPE:
- return new ActiveMQTopic(address);
- case QUEUE_TYPE:
- return new ActiveMQQueue(address);
- default:
- return new ActiveMQQueue(address);
+ case ANYCAST: prefix = QUEUE_QUALIFIED_PREFIX; break;
Review comment:
This looks like it no longer handles temporaries
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 551204)
Time Spent: 11h 40m (was: 11.5h)
> Artemis AMQP shouldn't depend on JMS
> ------------------------------------
>
> Key: ARTEMIS-3113
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3113
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: AMQP
> Affects Versions: 2.16.0
> Reporter: Emmanuel Hugonnet
> Priority: Major
> Time Spent: 11h 40m
> Remaining Estimate: 0h
>
> The converters between core messages and amqp messages depend on JMS. Since
> this is just for convenience we should remove this dependecy on an API that
> is being replaced.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)