/** * Sets the reply to destination of the message. This is a convenience method * for setting the {@link Headers#REPLY_TO} value. * * @param destination the reply to destination */ public void setReplyTo(String destination) { getHeaders().put(Headers.REPLY_TO, destination); }
/** * Sets the content type of the message. This is a convenience method for * setting the {@link Headers#CONTENT_TYPE} value. * * @param contentType * the content type to set */ public void setContentType(String contentType) { getHeaders().put(Headers.CONTENT_TYPE, contentType); }
/** * Sets the destination of the message. This is a convenience method for * setting the {@link Headers#DESTINATION} value. * * @param destination * the destination to set */ public void setDestination(String destination) { getHeaders().put(Headers.DESTINATION, destination); }
/** * Sets the ID of the message. This is a convenience method for setting the * {@link Headers#MESSAGE_ID} value. * * @param id the ID of the message */ public void setId(String id) { getHeaders().put(Headers.MESSAGE_ID, id); }
/** * Sets the correlation ID of the message. This is a convenience method for * setting the {@link Headers#CORRELATION_ID} value. * * @param correlationId the correlation ID of the message */ public void setCorrelationId(String correlationId) { getHeaders().put(Headers.CORRELATION_ID, correlationId); }
message.getHeaders().put(key, value);
mqMsg.getHeaders().put(MQ_HEADER_JMS_HEADER_PREFIX + entry.getKey(), entry.getValue()); mqMsg.getHeaders().put(MQ_HEADER_JMS_PROPERTY_PREFIX + entry.getKey(), entry.getValue()); HazelcastMQJmsDestination replyToDest = (HazelcastMQJmsDestination) jmsMsg .getJMSReplyTo(); mqMsg.getHeaders().put(Headers.REPLY_TO, replyToDest.getMqName()); mqMsg.getHeaders().put(Headers.CORRELATION_ID, jmsMsg.getJMSCorrelationID()); mqMsg.getHeaders().put(Headers.CONTENT_LENGTH, String.valueOf(body.length));
for (Map.Entry<String, Object> camelHeader : camelHeaders.entrySet()) { if (camelHeader.getValue() instanceof String) { mqMsg.getHeaders().put(camelHeader.getKey(), (String) camelHeader. getValue());
@Override public HazelcastMQMessage fromFrame(Frame frame) { HazelcastMQMessage msg = new HazelcastMQMessage(); org.mpilone.yeti.Headers headers = frame.getHeaders(); for (String name : headers.getHeaderNames()) { String value = headers.get(name); msg.getHeaders().put(name, value); } msg.setBody(frame.getBody()); return msg; }
msg.getHeaders().put(Headers.EXPIRATION, String.valueOf(System.currentTimeMillis() + timeToLive));