本文整理了Java中org.apache.activemq.artemis.api.core.Message.getIntProperty()
方法的一些代码示例,展示了Message.getIntProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getIntProperty()
方法的具体详情如下:
包路径:org.apache.activemq.artemis.api.core.Message
类名称:Message
方法名:getIntProperty
暂无
代码示例来源:origin: apache/activemq-artemis
public static int getIntProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return message.getGroupSequence();
} else {
return message.getIntProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
public static int getIntProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return message.getGroupSequence();
} else {
return message.getIntProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
public static int getIntProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return message.getGroupSequence();
} else {
return message.getIntProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
@Override
public void sendAcknowledged(Message message) {
listSent.add(message.getIntProperty("myid"));
}
});
代码示例来源:origin: apache/activemq-artemis
private int decideQoS(Message message, ServerConsumer consumer) {
int subscriptionQoS = -1;
try {
subscriptionQoS = session.getSubscriptionManager().getConsumerQoSLevels().get(consumer.getID());
} catch (NullPointerException e) {
// This can happen if the client disconnected during a server send.
return subscriptionQoS;
}
int qos = 2;
if (message.containsProperty(MQTTUtil.MQTT_QOS_LEVEL_KEY)) {
qos = message.getIntProperty(MQTTUtil.MQTT_QOS_LEVEL_KEY);
}
/* Subscription QoS is the maximum QoS the client is willing to receive for this subscription. If the message QoS
is less than the subscription QoS then use it, otherwise use the subscription qos). */
return subscriptionQoS < qos ? subscriptionQoS : qos;
}
}
代码示例来源:origin: org.apache.activemq/artemis-mqtt-protocol
private int decideQoS(Message message, ServerConsumer consumer) {
int subscriptionQoS = -1;
try {
subscriptionQoS = session.getSubscriptionManager().getConsumerQoSLevels().get(consumer.getID());
} catch (NullPointerException e) {
// This can happen if the client disconnected during a server send.
return subscriptionQoS;
}
int qos = 2;
if (message.containsProperty(MQTTUtil.MQTT_QOS_LEVEL_KEY)) {
qos = message.getIntProperty(MQTTUtil.MQTT_QOS_LEVEL_KEY);
}
/* Subscription QoS is the maximum QoS the client is willing to receive for this subscription. If the message QoS
is less than the subscription QoS then use it, otherwise use the subscription qos). */
return subscriptionQoS < qos ? subscriptionQoS : qos;
}
}
代码示例来源:origin: apache/activemq-artemis
void sendPubRelMessage(Message message) {
int messageId = message.getIntProperty(MQTTUtil.MQTT_MESSAGE_ID_KEY);
session.getSessionState().getOutboundStore().publishReleasedSent(messageId, message.getMessageID());
session.getProtocolHandler().sendPubRel(messageId);
}
代码示例来源:origin: org.apache.activemq/artemis-mqtt-protocol
void sendPubRelMessage(Message message) {
int messageId = message.getIntProperty(MQTTUtil.MQTT_MESSAGE_ID_KEY);
session.getSessionState().getOutboundStore().publishReleasedSent(messageId, message.getMessageID());
session.getProtocolHandler().sendPubRel(messageId);
}
代码示例来源:origin: apache/activemq-artemis
while (totalIterator.hasNext()) {
MessageReference ref = totalIterator.next();
Assert.assertEquals(i++, ref.getMessage().getIntProperty("order").intValue());
内容来源于网络,如有侵权,请联系作者删除!