@Test public void testSend_OK() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { SendResult sendResult = new SendResult(); sendResult.setMsgId("TestMsgID"); sendResult.setSendStatus(SendStatus.SEND_OK); when(rocketmqProducer.send(any(Message.class), anyLong())).thenReturn(sendResult); io.openmessaging.producer.SendResult omsResult = producer.send(producer.createBytesMessage("HELLO_TOPIC", new byte[] {'a'})); assertThat(omsResult.messageId()).isEqualTo("TestMsgID"); }
@Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue attributes(); @Override SendResult send(final Message message); @Override SendResult send(final Message message, final KeyValue properties); @Override SendResult send(Message message, LocalTransactionExecutor branchExecutor, KeyValue attributes); @Override Promise<SendResult> sendAsync(final Message message); @Override Promise<SendResult> sendAsync(final Message message, final KeyValue properties); @Override void sendOneway(final Message message); @Override void sendOneway(final Message message, final KeyValue properties); @Override BatchMessageSender createBatchMessageSender(); @Override void addInterceptor(ProducerInterceptor interceptor); @Override void removeInterceptor(ProducerInterceptor interceptor); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue attributes(); @Override SendResult send(final Message message); @Override SendResult send(final Message message, final KeyValue properties); @Override SendResult send(Message message, LocalTransactionExecutor branchExecutor, KeyValue attributes); @Override Promise<SendResult> sendAsync(final Message message); @Override Promise<SendResult> sendAsync(final Message message, final KeyValue properties); @Override void sendOneway(final Message message); @Override void sendOneway(final Message message, final KeyValue properties); @Override BatchMessageSender createBatchMessageSender(); @Override void addInterceptor(ProducerInterceptor interceptor); @Override void removeInterceptor(ProducerInterceptor interceptor);  }