本文整理了Java中org.apache.activemq.artemis.api.core.Message.getStringProperty()
方法的一些代码示例,展示了Message.getStringProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getStringProperty()
方法的具体详情如下:
包路径:org.apache.activemq.artemis.api.core.Message
类名称:Message
方法名:getStringProperty
暂无
代码示例来源:origin: wildfly/wildfly
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: apache/activemq-artemis
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: apache/activemq-artemis
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: apache/activemq-artemis
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: org.apache.activemq/artemis-core-client
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: org.apache.activemq/artemis-jms-client-all
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public static String getJMSCorrelationID(Message message) {
try {
return message.getStringProperty(CORRELATIONID_HEADER_NAME);
} catch (ActiveMQPropertyConversionException e) {
return null;
}
}
代码示例来源:origin: apache/activemq-artemis
public static String getStringProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPID.equals(name)) {
return Objects.toString(message.getGroupID(), null);
} else if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return Integer.toString(message.getGroupSequence());
} else if (MessageUtil.JMSXUSERID.equals(name)) {
return message.getValidatedUserID();
} else {
return message.getStringProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
public static String getStringProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPID.equals(name)) {
return Objects.toString(message.getGroupID(), null);
} else if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return Integer.toString(message.getGroupSequence());
} else if (MessageUtil.JMSXUSERID.equals(name)) {
return message.getValidatedUserID();
} else {
return message.getStringProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
public static String getStringProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPID.equals(name)) {
return Objects.toString(message.getGroupID(), null);
} else if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return Integer.toString(message.getGroupSequence());
} else if (MessageUtil.JMSXUSERID.equals(name)) {
return message.getValidatedUserID();
} else {
return message.getStringProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
reply.setReplyTo(message.getReplyTo());
String resourceName = message.getStringProperty(ManagementHelper.HDR_RESOURCE_NAME);
if (logger.isDebugEnabled()) {
logger.debug("handling management message for " + resourceName);
String operation = message.getStringProperty(ManagementHelper.HDR_OPERATION_NAME);
String attribute = message.getStringProperty(ManagementHelper.HDR_ATTRIBUTE);
代码示例来源:origin: apache/activemq-artemis
/**
* checks that there are no message duplicates in the page. Any IDs found in the ignoreIds field will not be tested
* this allows us to test only those messages that have been sent after the address has started paging (ignoring any
* duplicates that may have happened before this point).
*/
public void checkBatchMessagesAreNotPagedTwice(Queue queue) throws Exception {
LinkedListIterator<MessageReference> pageIterator = queue.browserIterator();
Set<String> messageOrderSet = new HashSet<>();
int duplicates = 0;
while (pageIterator.hasNext()) {
MessageReference reference = pageIterator.next();
String id = reference.getMessage().getStringProperty("id");
// If add(id) returns true it means that this id was already added to this set. Hence a duplicate is found.
if (!messageOrderSet.add(id)) {
duplicates++;
}
}
assertTrue(duplicates == 0);
}
代码示例来源:origin: apache/activemq-artemis
command.addHeader(Stomp.Headers.Message.PRIORITY, "" + message.getPriority());
command.addHeader(Stomp.Headers.Message.PERSISTENT, "" + message.isDurable());
if (message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME) != null) {
command.addHeader(Stomp.Headers.Message.REPLY_TO, message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME));
command.addHeader(Stomp.Headers.Message.TYPE, message.getObjectProperty(MessageUtil.TYPE_HEADER_NAME).toString());
if (message.getStringProperty(Message.HDR_CONTENT_TYPE.toString()) != null) {
command.addHeader(Stomp.Headers.CONTENT_TYPE, message.getStringProperty(Message.HDR_CONTENT_TYPE.toString()));
代码示例来源:origin: org.apache.activemq/artemis-stomp-protocol
command.addHeader(Stomp.Headers.Message.PRIORITY, "" + message.getPriority());
command.addHeader(Stomp.Headers.Message.PERSISTENT, "" + message.isDurable());
if (message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME) != null) {
command.addHeader(Stomp.Headers.Message.REPLY_TO, message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME));
command.addHeader(Stomp.Headers.Message.TYPE, message.getObjectProperty(MessageUtil.TYPE_HEADER_NAME).toString());
if (message.getStringProperty(Message.HDR_CONTENT_TYPE.toString()) != null) {
command.addHeader(Stomp.Headers.CONTENT_TYPE, message.getStringProperty(Message.HDR_CONTENT_TYPE.toString()));
代码示例来源:origin: apache/activemq-artemis
if (msg.getUserID() == null) {
String amqpNativeID = msg.getStringProperty(NATIVE_MESSAGE_ID);
if (amqpNativeID != null) {
return SimpleString.toSimpleString(amqpNativeID);
内容来源于网络,如有侵权,请联系作者删除!