本文整理了Java中org.apache.activemq.artemis.api.core.Message.getAnnotationString()
方法的一些代码示例,展示了Message.getAnnotationString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getAnnotationString()
方法的具体详情如下:
包路径:org.apache.activemq.artemis.api.core.Message
类名称:Message
方法名:getAnnotationString
暂无
代码示例来源:origin: wildfly/wildfly
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
代码示例来源:origin: apache/activemq-artemis
@Override
public void actMessage(Transaction tx, MessageReference ref) throws Exception {
String originalMessageAddress = ref.getMessage().getAnnotationString(Message.HDR_ORIGINAL_ADDRESS);
String originalMessageQueue = ref.getMessage().getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (originalMessageAddress != null) {
incDelivering(ref);
Long targetQueue = null;
if (originalMessageQueue != null && !originalMessageQueue.equals(originalMessageAddress)) {
targetQueue = queues.get(originalMessageQueue);
if (targetQueue == null) {
Binding binding = postOffice.getBinding(SimpleString.toSimpleString(originalMessageQueue));
if (binding != null && binding instanceof LocalQueueBinding) {
targetQueue = ((LocalQueueBinding) binding).getID();
queues.put(originalMessageQueue, targetQueue);
}
}
}
if (targetQueue != null) {
move(SimpleString.toSimpleString(originalMessageAddress), tx, ref, false, false, targetQueue.longValue());
} else {
move(SimpleString.toSimpleString(originalMessageAddress), tx, ref, false, false);
}
refRemoved(ref);
}
}
});
代码示例来源:origin: apache/activemq-artemis
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
代码示例来源:origin: org.apache.activemq/artemis-core-client
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
代码示例来源:origin: apache/activemq-artemis
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
代码示例来源:origin: apache/activemq-artemis
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
代码示例来源:origin: org.apache.activemq/artemis-jms-client-all
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
default void referenceOriginalMessage(final Message original, String originalQueue) {
String queueOnMessage = original.getAnnotationString(Message.HDR_ORIGINAL_QUEUE);
if (queueOnMessage != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, queueOnMessage);
} else if (originalQueue != null) {
setAnnotation(Message.HDR_ORIGINAL_QUEUE, originalQueue);
}
Object originalID = original.getAnnotation(Message.HDR_ORIG_MESSAGE_ID);
if (originalID != null) {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAnnotationString(Message.HDR_ORIGINAL_ADDRESS));
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, originalID);
} else {
setAnnotation(Message.HDR_ORIGINAL_ADDRESS, original.getAddress());
setAnnotation(Message.HDR_ORIG_MESSAGE_ID, original.getMessageID());
}
// reset expiry
setExpiration(0);
}
内容来源于网络,如有侵权,请联系作者删除!