60000毫秒后,元数据中不存在主题主题主题

问题描述

我们确实有kafka生产者构建应用程序。我需要为它编写集成测试用例。我试图使用DockerImageName和嵌入式kafka类创建一个zookeeper和kafka实例。如果我在创建我的Zookeper和kafka的同一个班级中创建生产者,则运行良好。但是当我试图从另一个类触发生产者时,它给出以下错误:

@Injectable({providedIn: 'root'})
export class PostsService {
  private posts: Post[] = [];
  private postsUpdated = new Subject<Post[]>();

  getPosts() {
    return [...this.posts];
  }

  getPostUpdateListener(){
    this.postsUpdated.asObservable();
  }

  addPosts(title: string,content: string) {
    const post: Post = {title:  title,content: content};
    this.posts.push(post);
    this.postsUpdated.next([...this.posts]);
  }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)