@Test public void testPoll_WithTimeout() { Message message = consumer.receive(); assertThat(message).isNull(); message = consumer.receive(OMS.newKeyValue().put(Message.BuiltinKeys.TIMEOUT, 100)); assertThat(message).isNull(); }
@Override public Message receive() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); }
PullConsumerImpl implements PullConsumer { @Override public Message receive() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } }
PullConsumerImpl implements PullConsumer { @Override public Message receive() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final KeyValue properties); }
PullConsumerImpl implements PullConsumer { @Override public Message receive() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final KeyValue properties); @Override KeyValue attributes(); @Override PullConsumer attachQueue(String queueName); @Override PullConsumer attachQueue(String queueName, KeyValue attributes); @Override PullConsumer detachQueue(String queueName); @Override Message receive(); @Override Message receive(final KeyValue properties); @Override void ack(final String messageId); @Override void ack(final String messageId, final KeyValue properties); @Override synchronized void startup(); @Override synchronized void shutdown(); }
PullConsumerImpl implements PullConsumer { @Override public Message receive() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final KeyValue properties); @Override KeyValue attributes(); @Override PullConsumer attachQueue(String queueName); @Override PullConsumer attachQueue(String queueName, KeyValue attributes); @Override PullConsumer detachQueue(String queueName); @Override Message receive(); @Override Message receive(final KeyValue properties); @Override void ack(final String messageId); @Override void ack(final String messageId, final KeyValue properties); @Override synchronized void startup(); @Override synchronized void shutdown();  }