org.apache.qpid.proton.message.Message.setCorrelationId()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中org.apache.qpid.proton.message.Message.setCorrelationId()方法的一些代码示例,展示了Message.setCorrelationId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setCorrelationId()方法的具体详情如下:
包路径:org.apache.qpid.proton.message.Message
类名称:Message
方法名:setCorrelationId

Message.setCorrelationId介绍

暂无

代码示例

代码示例来源:origin: EnMasseProject/enmasse

/**
 * Return a raw AMQP message
 *
 * @return
 */
public Message toAmqp() {
  Message message = ProtonHelper.message();
  message.setSubject(AMQP_SUBJECT);
  message.setCorrelationId(String.format(AmqpHelper.AMQP_CLIENT_PUBLISH_ADDRESS_TEMPLATE, this.clientId));
  return message;
}

代码示例来源:origin: EnMasseProject/enmasse

/**
 * Return a raw AMQP message
 *
 * @return
 */
public Message toAmqp() {
  Message message = ProtonHelper.message();
  message.setSubject(AMQP_SUBJECT);
  message.setCorrelationId(String.format(AmqpHelper.AMQP_CLIENT_PUBLISH_ADDRESS_TEMPLATE, this.clientId));
  message.setReplyTo(String.format(AmqpHelper.AMQP_CLIENT_CONTROL_ADDRESS_TEMPLATE, this.clientId));
  return message;
}

代码示例来源:origin: apache/activemq-artemis

/**
* Sets the CorrelationId property on an outbound message using the provided value
*
* @param correlationId the correlation ID value to set.
*/
public void setRawCorrelationId(Object correlationId) {
 checkReadOnly();
 lazyCreateProperties();
 getWrappedMessage().setCorrelationId(correlationId);
}

代码示例来源:origin: apache/activemq-artemis

/**
* Sets the CorrelationId property on an outbound message using the provided String
*
* @param correlationId the String Correlation ID value to set.
*/
public void setCorrelationId(String correlationId) {
 checkReadOnly();
 lazyCreateProperties();
 getWrappedMessage().setCorrelationId(correlationId);
}

代码示例来源:origin: EnMasseProject/enmasse

/**
 * Return a raw AMQP message
 *
 * @return
 */
public Message toAmqp() {
  Message message = ProtonHelper.message();
  message.setSubject(AMQP_SUBJECT);
  message.setCorrelationId(String.format(AmqpHelper.AMQP_CLIENT_PUBLISH_ADDRESS_TEMPLATE, this.clientId));
  message.setBody(new AmqpValue(this.topics));
  return message;
}

代码示例来源:origin: EnMasseProject/enmasse

/**
 * Return a raw AMQP message
 *
 * @return
 */
public Message toAmqp() {
  Message message = ProtonHelper.message();
  message.setSubject(AMQP_SUBJECT);
  message.setCorrelationId(String.format(AmqpHelper.AMQP_CLIENT_PUBLISH_ADDRESS_TEMPLATE, this.clientId));
  // map with topic -> qos (in String format)
  Map<String, String> map = new HashMap<>();
  this.topicSubscriptions.stream().forEach(amqpTopicSubscription -> {
    map.put(amqpTopicSubscription.topic(), String.valueOf(amqpTopicSubscription.qos().value()));
  });
  message.setBody(new AmqpValue(map));
  return message;
}

代码示例来源:origin: org.eclipse.hono/hono-client

private static Message createResponseMessage(
    final String targetAddress,
    final String correlationId,
    final String contentType,
    final Buffer payload,
    final Map<String, Object> properties,
    final int status) {
  Objects.requireNonNull(targetAddress);
  Objects.requireNonNull(correlationId);
  final Message msg = ProtonHelper.message();
  msg.setCorrelationId(correlationId);
  msg.setAddress(targetAddress);
  MessageHelper.setPayload(msg, contentType, payload);
  if (properties != null) {
    msg.setApplicationProperties(new ApplicationProperties(properties));
  }
  MessageHelper.setCreationTime(msg);
  MessageHelper.addProperty(msg, MessageHelper.APP_PROPERTY_STATUS, status);
  return msg;
}

代码示例来源:origin: strimzi/strimzi-kafka-bridge

message.setReplyTo(entry.getValue().toString());
} else if (entry.getKey().equals(AmqpJsonMessageConverter.CORRELATION_ID)) {
  message.setCorrelationId(entry.getValue());

代码示例来源:origin: org.eclipse.hono/hono-core

message.setCorrelationId(correlationId);
message.setAddress(address.toString());

代码示例来源:origin: eclipse/hono

message.setCorrelationId(correlationId);
message.setAddress(address.toString());

代码示例来源:origin: Azure/azure-event-hubs-java

break;
case AmqpConstants.AMQP_PROPERTY_CORRELATION_ID:
  amqpMessage.setCorrelationId(systemProperty.getValue());
  break;
case AmqpConstants.AMQP_PROPERTY_CONTENT_TYPE:

代码示例来源:origin: eclipse/hono

if (msg.getCorrelationId() == null) {
  msg.setCorrelationId(msg.getMessageId());

代码示例来源:origin: Azure/azure-service-bus-java

amqpMessage.setCorrelationId(brokeredMessage.getCorrelationId());
amqpMessage.setSubject(brokeredMessage.getLabel());
amqpMessage.getProperties().setTo(brokeredMessage.getTo());

代码示例来源:origin: io.vertx/vertx-amqp-bridge

protonMsg.setReplyTo(testReplyToAddress);
protonMsg.setMessageId(testMessageId);
protonMsg.setCorrelationId(testCorrelationId);
protonMsg.setSubject(testSubject);
protonMsg.setGroupId(testGroupId);

相关文章