本文整理了Java中org.apache.qpid.proton.message.Message.setDurable()
方法的一些代码示例,展示了Message.setDurable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setDurable()
方法的具体详情如下:
包路径:org.apache.qpid.proton.message.Message
类名称:Message
方法名:setDurable
暂无
代码示例来源:origin: org.eclipse.hono/hono-client
/**
* Sends an AMQP 1.0 message to the peer this client is configured for
* and waits for the outcome of the transfer.
* <p>
* This method sets the message's <em>durable</em> property to {@code true} and
* then invokes {@link #sendMessageAndWaitForOutcome(Message, Span)}.
*
* @param message The message to send.
* @param currentSpan The <em>OpenTracing</em> span used to trace the sending of the message.
* The span will be finished by this method and will contain an error log if
* the message has not been accepted by the peer.
* @return A future indicating the outcome of the operation.
* <p>
* The future will succeed if the message has been accepted (and settled)
* by the peer.
* <p>
* The future will be failed with a {@link ServiceInvocationException} if the
* message could not be sent or has not been accepted by the peer.
* @throws NullPointerException if any of the parameters are {@code null}.
*/
@Override
protected Future<ProtonDelivery> sendMessage(final Message message, final Span currentSpan) {
message.setDurable(true);
return sendMessageAndWaitForOutcome(message, currentSpan);
}
代码示例来源:origin: apache/activemq-artemis
/**
* Sets the durable header on the outgoing message.
*
* @param durable the boolean durable value to set.
*/
public void setDurable(boolean durable) {
checkReadOnly();
lazyCreateHeader();
getWrappedMessage().setDurable(durable);
}
代码示例来源:origin: io.vertx/vertx-amqp-bridge
protonMsg.setDurable(testDurable);
protonMsg.setPriority(testPriority);
protonMsg.setTtl(testTtl);
内容来源于网络,如有侵权,请联系作者删除!