Interface ClientProducer

    • Method Detail

      • getAddress

        SimpleString getAddress()
        Returns the address where messages will be sent.

        The address can be null if the ClientProducer was creating without specifying an address, that is by using ClientSession.createProducer().
        Returns:
        the address where messages will be sent
      • send

        void send​(Message message,
                  SendAcknowledgementHandler handler)
           throws ActiveMQException
        Sends a message to the specified address instead of the ClientProducer's address.

        This message will be sent asynchronously.

        The handler will only get called if -1.

        Parameters:
        message - the message to send
        handler - handler to call after receiving a SEND acknowledgement from the server
        Throws:
        ActiveMQException - if an exception occurs while sending the message
      • isClosed

        boolean isClosed()
        Returns whether the producer is closed or not.
        Returns:
        true if the producer is closed, false else
      • isBlockOnDurableSend

        boolean isBlockOnDurableSend()
        Returns whether the producer will block when sending durable messages.
        Returns:
        true if the producer blocks when sending durable, false else
      • isBlockOnNonDurableSend

        boolean isBlockOnNonDurableSend()
        Returns whether the producer will block when sending non-durable messages.
        Returns:
        true if the producer blocks when sending non-durable, false else
      • getMaxRate

        int getMaxRate()
        Returns the maximum rate at which a ClientProducer can send messages per second.
        Returns:
        the producers maximum rate