@Test public void testWaitForMsgOnTopic() throws Exception { when(transport.subscribeAndConsumeFromTopic(Optional.of("TopicName"), Duration.ofMillis(1))).thenReturn(new Cdr("NONE")); Cdr cdr = messageBrokerClient.waitForMsgOnTopic(Optional.of("TopicName"), 1); assertEquals("NONE", cdr.getType()); }
public Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds) throws EtiqetException { return getTransport().subscribeAndConsumeFromTopic(topic, Duration.ofMillis(milliseconds)); }
MessageBrokerClient extends Client { public Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds) throws EtiqetException { return getTransport().subscribeAndConsumeFromTopic(topic, Duration.ofMillis(milliseconds)); } }
MessageBrokerClient extends Client { public Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds) throws EtiqetException { return getTransport().subscribeAndConsumeFromTopic(topic, Duration.ofMillis(milliseconds)); } MessageBrokerClient(String clientConfig);  MessageBrokerClient(String primaryClientConfig, String secondaryClientConfig);  MessageBrokerClient(String primaryClientConfig, String secondaryClientConfig, ProtocolConfig protocol); }
MessageBrokerClient extends Client { public Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds) throws EtiqetException { return getTransport().subscribeAndConsumeFromTopic(topic, Duration.ofMillis(milliseconds)); } MessageBrokerClient(String clientConfig);  MessageBrokerClient(String primaryClientConfig, String secondaryClientConfig);  MessageBrokerClient(String primaryClientConfig, String secondaryClientConfig, ProtocolConfig protocol); @Override boolean isLoggedOn(); void subscribeToTopic(String topicName); void subscribeToQueue(String queueName); void sendMessageToTopic(Cdr message, Optional<String> topicName); void sendMessageToQueue(Cdr message, String queueName); Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds); Cdr waitForMsgOnQueue(String queueName, int milliseconds); List<Cdr> getReceivedMessagesFromTopic(String topicName); List<Cdr> getReceivedMessagesFromQueue(String queueName); Optional<Cdr> getLastMessageFromTopic(String topicName); Optional<Cdr> getLastMessageFromQueue(String queueName); void clearQueue(String queueName); @Override BrokerTransport getTransport(); }
MessageBrokerClient extends Client { public Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds) throws EtiqetException { return getTransport().subscribeAndConsumeFromTopic(topic, Duration.ofMillis(milliseconds)); } MessageBrokerClient(String clientConfig);  MessageBrokerClient(String primaryClientConfig, String secondaryClientConfig);  MessageBrokerClient(String primaryClientConfig, String secondaryClientConfig, ProtocolConfig protocol); @Override boolean isLoggedOn(); void subscribeToTopic(String topicName); void subscribeToQueue(String queueName); void sendMessageToTopic(Cdr message, Optional<String> topicName); void sendMessageToQueue(Cdr message, String queueName); Cdr waitForMsgOnTopic(Optional<String> topic, int milliseconds); Cdr waitForMsgOnQueue(String queueName, int milliseconds); List<Cdr> getReceivedMessagesFromTopic(String topicName); List<Cdr> getReceivedMessagesFromQueue(String queueName); Optional<Cdr> getLastMessageFromTopic(String topicName); Optional<Cdr> getLastMessageFromQueue(String queueName); void clearQueue(String queueName); @Override BrokerTransport getTransport();  }