@Test public void testTopicBeDeletedDuringProducerRunning() throws Exception { GetDescribeInfoResponse getDescribeInfoResponse = new GetDescribeInfoResponse( talosResourceName, partitionNumber); GetDescribeInfoResponse getDescribeInfoResponse2 = new GetDescribeInfoResponse( new TopicTalosResourceName(anotherResourceName), partitionNumber); when(talosAdminMock.getDescribeInfo(new GetDescribeInfoRequest(topicName))) .thenReturn(getDescribeInfoResponse).thenReturn(getDescribeInfoResponse2); doNothing().when(partitionSenderMock).shutdown(); talosProducer = new TalosProducer(talosProducerConfig, talosResourceName, talosAdminMock, talosClientFactoryMock, partitionSenderMock, new SimpleTopicAbnormalCallback(), new TestCallback()); Thread.sleep(checkPartitionInterval * 2); }
public synchronized void shutdown() { if (!isActive()) { return; } producerState.set(PRODUCER_STATE.SHUTDOWN); stopAndWait(); }
TalosProducer { public synchronized void shutdown() { if (!isActive()) { return; } producerState.set(PRODUCER_STATE.SHUTDOWN); stopAndWait(); } }
TalosProducer { public synchronized void shutdown() { if (!isActive()) { return; } producerState.set(PRODUCER_STATE.SHUTDOWN); stopAndWait(); } TalosProducer(TalosProducerConfig producerConfig,
      TopicTalosResourceName topicTalosResourceName,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); @Deprecated  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      TopicTalosResourceName topicTalosResourceName,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      String topicName, TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      String topicName, Partitioner partitioner,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); @Deprecated  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      TopicTalosResourceName topicTalosResourceName, Partitioner partitioner,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig,
      TopicTalosResourceName topicTalosResourceName, TalosAdmin talosAdmin,
      TalosClientFactory talosClientFactory,
      PartitionSender partitionSender,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); }
TalosProducer { public synchronized void shutdown() { if (!isActive()) { return; } producerState.set(PRODUCER_STATE.SHUTDOWN); stopAndWait(); } TalosProducer(TalosProducerConfig producerConfig,
      TopicTalosResourceName topicTalosResourceName,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); @Deprecated  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      TopicTalosResourceName topicTalosResourceName,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      String topicName, TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      String topicName, Partitioner partitioner,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); @Deprecated  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      TopicTalosResourceName topicTalosResourceName, Partitioner partitioner,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig,
      TopicTalosResourceName topicTalosResourceName, TalosAdmin talosAdmin,
      TalosClientFactory talosClientFactory,
      PartitionSender partitionSender,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); synchronized void addUserMessage(List<Message> msgList, long timeoutMillis); synchronized void addUserMessage(int partitionId, List<Message> msgList); synchronized void addUserMessage(List<Message> msgList); synchronized void shutdown(); boolean isActive(); boolean isDisabled(); boolean isShutdowned(); }
TalosProducer { public synchronized void shutdown() { if (!isActive()) { return; } producerState.set(PRODUCER_STATE.SHUTDOWN); stopAndWait(); } TalosProducer(TalosProducerConfig producerConfig,
      TopicTalosResourceName topicTalosResourceName,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); @Deprecated  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      TopicTalosResourceName topicTalosResourceName,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      String topicName, TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      String topicName, Partitioner partitioner,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); @Deprecated  TalosProducer(TalosProducerConfig producerConfig, Credential credential,
      TopicTalosResourceName topicTalosResourceName, Partitioner partitioner,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback);  TalosProducer(TalosProducerConfig producerConfig,
      TopicTalosResourceName topicTalosResourceName, TalosAdmin talosAdmin,
      TalosClientFactory talosClientFactory,
      PartitionSender partitionSender,
      TopicAbnormalCallback topicAbnormalCallback,
      UserMessageCallback userMessageCallback); synchronized void addUserMessage(List<Message> msgList, long timeoutMillis); synchronized void addUserMessage(int partitionId, List<Message> msgList); synchronized void addUserMessage(List<Message> msgList); synchronized void shutdown(); boolean isActive(); boolean isDisabled(); boolean isShutdowned();  }