Beispiel #1
0
 public BasicProperties toBasicProperties() {
   BasicProperties.Builder builder = new BasicProperties.Builder();
   return builder
       .appId(appId)
       .clusterId(clusterId)
       .contentEncoding(contentEncoding)
       .contentType(contentType)
       .correlationId(correlationId)
       .deliveryMode(deliveryMode)
       .expiration(expiration)
       .headers(headers)
       .messageId(messageId)
       .priority(priority)
       .replyTo(replyTo)
       .timestamp(timestamp)
       .type(type)
       .userId(userId)
       .build();
 }
 private BasicProperties convertProperties(MessageProperties properties) {
   if (properties == null) {
     return null;
   }
   // TODO: Figure out a better way to share this data and not duplicate
   BasicProperties.Builder props = new BasicProperties.Builder();
   props.appId(properties.getAppId());
   // props.setClusterId(?);
   props.contentEncoding(properties.getContentEncoding());
   props.contentType(properties.getContentType());
   props.correlationId(properties.getCorrelationId());
   if (properties.getDeliveryMode() != null) {
     props.deliveryMode(properties.getDeliveryMode().getMode());
   }
   props.expiration(properties.getExpiration());
   props.headers(properties.getHeaders());
   props.messageId(properties.getMessageId());
   props.priority(properties.getPriority());
   props.replyTo(properties.getReplyTo());
   props.timestamp(properties.getTimestamp());
   props.type(properties.getType());
   props.userId(properties.getUserId());
   return props.build();
 }