代码之家  ›  专栏  ›  技术社区  ›  VGH

请求被apache camel丢弃

  •  1
  • VGH  · 技术社区  · 6 年前

    下面是在服务器启动期间执行的代码,其中MessageProcessor的receive方法一直在侦听tibco总线主题。这里的问题是很少有请求被丢弃,而且它不可复制。这种情况偶尔发生。知道camel为什么要放弃巴士上的请求吗?

    reg.put("MessageProcessor", new MessageProcessor());
                // Create the context and configure route
                context = new DefaultCamelContext(reg);
                context.addRoutes(new RouteBuilder() {
                    public void configure() {
                        from(
                                "bus://"
                                        + subject
                                        + "?poolSize="
                                        + poolSize
                                        + "&account=busaccount&credentials=buscredentials&policy=buspolicy")
                                .threads(Integer.parseInt(minPoolSize),
                                        Integer.parseInt(maxPoolSize))
                                .to("bean:MessageProcessor?method=receive(Exchange)");
                    }
                });
    // Start listening
                context.start();
    

    注意:我们猜测,当请求数>;上面配置的maxPoolSize。看来这不是原因。我们修改了 short-running-threads long-running-threads 在Jboss单机版中。然而,xml的值(200)与maxPoolSize(50)不匹配。你认为他们应该是一样的吗? 我们想知道为什么camel会从总线上删除这些请求并修复它。

    0 回复  |  直到 6 年前