Search in sources :

Example 1 with SendTopicMessageRequest

use of org.apache.rocketmq.console.model.request.SendTopicMessageRequest in project rocketmq-externals by apache.

the class TopicServiceImplTest method sendTopicMessageRequest.

@Test
public void sendTopicMessageRequest() throws Exception {
    SendTopicMessageRequest sendTopicMessageRequest = new SendTopicMessageRequest();
    sendTopicMessageRequest.setTopic(TEST_CONSOLE_TOPIC);
    sendTopicMessageRequest.setMessageBody("sendTopicMessageRequestMessageBody");
    sendTopicMessageRequest.setKey("sendTopicMessageRequestKey");
    sendTopicMessageRequest.setTag("sendTopicMessageRequestTag");
    SendResult sendResult = topicService.sendTopicMessageRequest(sendTopicMessageRequest);
    Assert.assertNotNull(sendResult);
    Assert.assertTrue(StringUtils.isNoneBlank(sendResult.getMsgId()));
}
Also used : SendTopicMessageRequest(org.apache.rocketmq.console.model.request.SendTopicMessageRequest) SendResult(org.apache.rocketmq.client.producer.SendResult) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

SendResult (org.apache.rocketmq.client.producer.SendResult)1 SendTopicMessageRequest (org.apache.rocketmq.console.model.request.SendTopicMessageRequest)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1