Package io.vertx.amqp

Interface AmqpSender

    • Method Detail

      • setWriteQueueMaxSize

        AmqpSender setWriteQueueMaxSize​(int maxSize)
        Description copied from interface: WriteStream
        Set the maximum size of the write queue to maxSize. You will still be able to write to the stream even if there is more than maxSize items in the write queue. This is used as an indicator by classes such as Pipe to provide flow control.

        The value is defined by the implementation of the stream, e.g in bytes for a NetSocket, etc...

        Specified by:
        setWriteQueueMaxSize in interface WriteStream<AmqpMessage>
        Parameters:
        maxSize - the max size of the write stream
        Returns:
        a reference to this, so the API can be used fluently
      • send

        AmqpSender send​(AmqpMessage message)
        Sends an AMQP message. The destination the configured sender address or the address configured in the message.
        Parameters:
        message - the message, must not be null
        Returns:
        the current sender
      • sendWithAck

        Future<Void> sendWithAck​(AmqpMessage message)
        Sends an AMQP message and waits for an acknowledgement. It returns a future marked as failed if the message has been rejected or re-routed. If the message has been accepted, the handler is called with a success.
        Parameters:
        message - the message, must not be null
        Returns:
        a future notified with the acknowledgement
      • close

        Future<Void> close()
        Closes the sender.
        Returns:
        a future notified when the sender has been closed
      • address

        String address()
        Returns:
        the configured address.
      • connection

        AmqpConnection connection()
        Gets the connection having created the sender. Cannot be null
        Returns:
        the connection having created the sender.
      • remainingCredits

        long remainingCredits()
        Returns:
        the remaining credit, 0 is none.
      • unwrap

        io.vertx.proton.ProtonSender unwrap()
        Returns:
        the underlying ProtonSender.