Skip navigation links
org.apache.activemq.artemis.junit

Class ActiveMQProducerResource

    • Constructor Detail

      • ActiveMQProducerResource

        protected ActiveMQProducerResource(String url)
      • ActiveMQProducerResource

        protected ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator)
      • ActiveMQProducerResource

        public ActiveMQProducerResource(String url,
                                        String address)
      • ActiveMQProducerResource

        public ActiveMQProducerResource(String url,
                                        org.apache.activemq.artemis.api.core.SimpleString address)
      • ActiveMQProducerResource

        public ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator,
                                        String address)
      • ActiveMQProducerResource

        public ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator,
                                        org.apache.activemq.artemis.api.core.SimpleString address)
    • Method Detail

      • isUseDurableMessage

        public boolean isUseDurableMessage()
      • setUseDurableMessage

        public void setUseDurableMessage(boolean useDurableMessage)
        Disables/Enables creating durable messages. By default, durable messages are created
        Parameters:
        useDurableMessage - if true, durable messages will be created
      • createMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage()
        Create a ClientMessage

        If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created

        Returns:
        a new ClientMessage
      • createMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(byte[] body)
        Create a ClientMessage with the specified body

        If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created

        Parameters:
        body - the body for the new message
        Returns:
        a new ClientMessage with the specified body
      • createMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(String body)
        Create a ClientMessage with the specified body

        If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created

        Parameters:
        body - the body for the new message
        Returns:
        a new ClientMessage with the specified body
      • createMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(Map<String,Object> properties)
        Create a ClientMessage with the specified message properties

        If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created

        Parameters:
        properties - message properties for the new message
        Returns:
        a new ClientMessage with the specified message properties
      • createMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(byte[] body,
                                                                                       Map<String,Object> properties)
        Create a ClientMessage with the specified body and message properties

        If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created

        Parameters:
        body - the body for the new message
        properties - message properties for the new message
        Returns:
        a new ClientMessage with the specified body and message properties
      • createMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(String body,
                                                                                       Map<String,Object> properties)
        Create a ClientMessage with the specified body and message properties

        If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created

        Parameters:
        body - the body for the new message
        properties - message properties for the new message
        Returns:
        a new ClientMessage with the specified body and message properties
      • sendMessage

        public void sendMessage(org.apache.activemq.artemis.api.core.client.ClientMessage message)
        Send a ClientMessage to the server
        Parameters:
        message - the message to send
      • sendMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(byte[] body)
        Create a new ClientMessage with the specified body and send to the server
        Parameters:
        body - the body for the new message
        Returns:
        the message that was sent
      • sendMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(String body)
        Create a new ClientMessage with the specified body and send to the server
        Parameters:
        body - the body for the new message
        Returns:
        the message that was sent
      • sendMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(Map<String,Object> properties)
        Create a new ClientMessage with the specified properties and send to the server
        Parameters:
        properties - the properties for the new message
        Returns:
        the message that was sent
      • sendMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(byte[] body,
                                                                                     Map<String,Object> properties)
        Create a new ClientMessage with the specified body and and properties and send to the server
        Parameters:
        properties - the properties for the new message
        Returns:
        the message that was sent
      • sendMessage

        public org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(String body,
                                                                                     Map<String,Object> properties)
        Create a new ClientMessage with the specified body and and properties and send to the server
        Parameters:
        properties - the properties for the new message
        Returns:
        the message that was sent

Copyright © 2023 The Apache Software Foundation. All Rights Reserved.