/** * Sends an AMQP 1.0 message to the endpoint configured for this client. * <p> * This default implementation simply returns the result of {@link #send(Message)}. * * @param message The message to send. * @param context The currently active OpenTracing span. An implementation * should use this as the parent for any span it creates for tracing * the execution of this operation. * @return A future indicating the outcome of the operation. * <p> * The future will be succeeded if the message has been sent to the endpoint. * The delivery contained in the future represents the delivery state at the time * the future has been succeeded, i.e. for telemetry data it will be locally * <em>unsettled</em> without any outcome yet. For events it will be locally * and remotely <em>settled</em> and will contain the <em>accepted</em> outcome. * <p> * The future will be failed with a {@link ServerErrorException} if the message * could not be sent due to a lack of credit. * If an event is sent which cannot be processed by the peer the future will * be failed with either a {@code ServerErrorException} or a {@link ClientErrorException} * depending on the reason for the failure to process the message. * @throws NullPointerException if message is {@code null}. */ default Future<ProtonDelivery> send(Message message, SpanContext context) { return send(message); }
return sender.send(downstreamMessage, currentSpan.context()); } else {
return sender.send(downstreamMessage);
); messageSender.send(HonoExampleConstants.DEVICE_ID, null, "myMessage" + value, "text/plain", token, capacityAvail -> { capacityAvailableFuture.complete(null);
return sender.sendAndWaitForOutcome(downstreamMessage, currentSpan.context()); } else { return sender.send(downstreamMessage, currentSpan.context());
return senderFuture.result().send( deviceId, payload.encode().getBytes(StandardCharsets.UTF_8),
sender.send(downstreamMessage, currentSpan.context()), responseReady) .map(s -> (Void) null);
return senderFuture.result().send( deviceId, payload.encode().getBytes(StandardCharsets.UTF_8),
return sender.sendAndWaitForOutcome(downstreamMessage, currentSpan.context()); } else { return sender.send(downstreamMessage, currentSpan.context());
sender.send(downstreamMessage, currentSpan.context()), responseReady) .map(s -> (Void) null);