标签: poller

Spring集成没有为端点定义轮询器

嗨,我很难解决我的xml配置,

这是我的spring integration config xml:

<context:annotation-config />
    <context:component-scan base-package="hk.com.test.spring.integration" />

    <int:channel id="orders" />
    <int:channel id="drinks" />

    <int:channel id="hotDrink">
        <int:queue capacity="5" />
    </int:channel>

    <int:channel id="coldDrink">
        <int:queue capacity="10" />
    </int:channel>

    <bean id="drinkRouter" class="hk.com.test.spring.integration.DrinkRouter" />
    <bean id="orderSplitter" class="hk.com.test.spring.integration.OrderSplitter" />
    <bean id="barista" class="hk.com.test.spring.integration.Barista" />

    <int:gateway id="cafe" service-interface="hk.com.test.spring.integration.Cafe" />

    <int:splitter input-channel="orders" ref="orderSplitter"
        method="split" output-channel="drinks" />

    <int:router input-channel="drinks" ref="drinkRouter" method="resolveItemChannel" />


    <int:service-activator input-channel="coldDrink"
        ref="barista" method="prepareColdDrink" />

    <int:service-activator input-channel="hotDrink"
        ref="barista" method="preparehotDrink" />
Run Code Online (Sandbox Code Playgroud)

这是我的主要课程::

public class Main {

    public static void main(String args[]) {
        System.out.println("Hello");

        // load the …
Run Code Online (Sandbox Code Playgroud)

java spring spring-integration poller

12
推荐指数
2
解决办法
2万
查看次数

ZeroMQ Poller vs Tornados EventLoop

设计明智和性能明智哪种方法建议用于处理多个Zeromq插座,为什么?

ZeroMQ使用的Tornado的IOLoop是否真的比使用while循环中的Poller处理多个套接字的CPU少?

python tornado event-loop zeromq poller

5
推荐指数
1
解决办法
2551
查看次数

在一个轮询器中Laravel和AJAX零星的401错误

我在Laravel 5.0编写一个拍卖网站,通过使用每5秒执行一次的AJAX轮询来模拟实时更新.问题是我的服务器返回零星的HTTP 401状态.

我的路线是这样构建的:

Route::post(auction/live/update, 'AuctionController@ajaxSendUpdate');
Run Code Online (Sandbox Code Playgroud)

我的控制器是这样的:

public function ajaxSendUpdate() {
    // Business logic: queries database, couple of Ifs, etc…
    $data = array('success' => true, 'otherStuff' => $myData);
    return Response::json($data);
}
Run Code Online (Sandbox Code Playgroud)

最后我的poller设置如下:

// a bit of HTML
function getAuctionUpdate() {
    setTimeout(function () {
    $.ajax({
        type: "POST",
        url: "{!! url('auction/live/update')!!}",
            dataType: 'json',
            data: {
                auctionID: $('#auctionID').val()
            },
            success: function (data) {
                if (data['success']) {
                    // Updates some labels, etc.
                   getAuctionUpdate(); // Rearms itself
                }
            }
    } }); // Not sure if …
Run Code Online (Sandbox Code Playgroud)

php ajax jquery poller laravel

5
推荐指数
1
解决办法
1772
查看次数

如何在backbone.js中进行轮询?

嗨,我正在使用backbone.js在paly2.0框架应用程序(使用java)上工作.在我的应用程序中,我需要定期从数据库中获取表数据(对于显示即将发生的事件列表的用例以及是否应该从列表中删除旧事件).我正在显示数据,但是问题是定期访问数据库.为此我尝试使用backbone.js轮询概念按照这些链接使用Backbone.js轮询集合,http://kilon.org/blog/2012/02/backbone-poller/ .But他们没有从db中查询最新的集合.请建议我如何实现这个或任何其他选择?谢谢你.

polling poller backbone.js play2-mini

2
推荐指数
1
解决办法
3662
查看次数

fixedDelay() 和 fixedRate() 的区别

spring 集成Pollers.fixedDelay(5000)Pollers.fixedRate(5000)spring 集成有Pollers什么区别?

spring-integration poller spring-integration-dsl

1
推荐指数
1
解决办法
1080
查看次数