本文整理了Java中org.apache.activemq.artemis.api.core.Message.getDuplicateProperty()
方法的一些代码示例,展示了Message.getDuplicateProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getDuplicateProperty()
方法的具体详情如下:
包路径:org.apache.activemq.artemis.api.core.Message
类名称:Message
方法名:getDuplicateProperty
暂无
代码示例来源:origin: wildfly/wildfly
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: apache/activemq-artemis
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: org.apache.activemq/artemis-jms-client-all
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: apache/activemq-artemis
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: apache/activemq-artemis
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: org.apache.activemq/artemis-core-client
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
* @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
if (duplicateID == null) {
return null;
} else {
if (duplicateID instanceof SimpleString) {
return ((SimpleString) duplicateID).getData();
} else if (duplicateID instanceof String) {
return new SimpleString(duplicateID.toString()).getData();
} else {
return (byte[]) duplicateID;
}
}
}
代码示例来源:origin: apache/activemq-artemis
@Override
public void actMessage(Transaction tx, MessageReference ref) throws Exception {
boolean ignored = false;
incDelivering(ref);
if (rejectDuplicates) {
byte[] duplicateBytes = ref.getMessage().getDuplicateIDBytes();
if (duplicateBytes != null) {
if (targetDuplicateCache.contains(duplicateBytes)) {
ActiveMQServerLogger.LOGGER.messageWithDuplicateID(ref.getMessage().getDuplicateProperty(), toAddress, address, address);
acknowledge(tx, ref);
ignored = true;
}
}
}
if (!ignored) {
move(null, toAddress, binding, ref, rejectDuplicates, AckReason.NORMAL, null);
refRemoved(ref);
//move(toAddress, tx, ref, false, rejectDuplicates);
}
}
});
内容来源于网络,如有侵权,请联系作者删除!