use of org.apache.activemq.artemis.api.core.client.ClientMessage in project activemq-artemis by apache.
the class ActiveMQProducerResource method createMessage.
/**
* Create a ClientMessage with the specified body and message properties
* <p>
* If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
*
* @param body the body for the new message
* @param properties message properties for the new message
* @return a new ClientMessage with the specified body and message properties
*/
public ClientMessage createMessage(byte[] body, Map<String, Object> properties) {
ClientMessage message = createMessage(body);
addMessageProperties(message, properties);
return message;
}
use of org.apache.activemq.artemis.api.core.client.ClientMessage in project activemq-artemis by apache.
the class ActiveMQProducerResource method sendMessage.
/**
* Create a new ClientMessage with the specified body and and properties and send to the server
*
* @param properties the properties for the new message
* @return the message that was sent
*/
public ClientMessage sendMessage(String body, Map<String, Object> properties) {
ClientMessage message = createMessage(body);
sendMessage(message);
return message;
}
use of org.apache.activemq.artemis.api.core.client.ClientMessage in project activemq-artemis by apache.
the class ActiveMQProducerResource method sendMessage.
/**
* Create a new ClientMessage with the specified properties and send to the server
*
* @param properties the properties for the new message
* @return the message that was sent
*/
public ClientMessage sendMessage(Map<String, Object> properties) {
ClientMessage message = createMessage(properties);
sendMessage(message);
return message;
}
use of org.apache.activemq.artemis.api.core.client.ClientMessage in project activemq-artemis by apache.
the class ActiveMQProducerResource method createMessage.
/**
* Create a ClientMessage with the specified message properties
* <p>
* If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
*
* @param properties message properties for the new message
* @return a new ClientMessage with the specified message properties
*/
public ClientMessage createMessage(Map<String, Object> properties) {
ClientMessage message = createMessage();
addMessageProperties(message, properties);
return message;
}
use of org.apache.activemq.artemis.api.core.client.ClientMessage in project activemq-artemis by apache.
the class ActiveMQDynamicProducerResource method sendMessage.
/**
* Create a new ClientMessage with the specified body and send to the server
*
* @param targetAddress the target address
* @param body the body for the new message
* @return the message that was sent
*/
public ClientMessage sendMessage(SimpleString targetAddress, String body) {
ClientMessage message = createMessage(body);
sendMessage(targetAddress, message);
return message;
}
Aggregations