嗨,我很难解决我的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) 设计明智和性能明智哪种方法建议用于处理多个Zeromq插座,为什么?
ZeroMQ使用的Tornado的IOLoop是否真的比使用while循环中的Poller处理多个套接字的CPU少?
我在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) 嗨,我正在使用backbone.js在paly2.0框架应用程序(使用java)上工作.在我的应用程序中,我需要定期从数据库中获取表数据(对于显示即将发生的事件列表的用例以及是否应该从列表中删除旧事件).我正在显示数据,但是问题是定期访问数据库.为此我尝试使用backbone.js轮询概念按照这些链接使用Backbone.js轮询集合,http://kilon.org/blog/2012/02/backbone-poller/ .But他们没有从db中查询最新的集合.请建议我如何实现这个或任何其他选择?谢谢你.
spring 集成Pollers.fixedDelay(5000)和Pollers.fixedRate(5000)spring 集成有Pollers什么区别?
poller ×5
ajax ×1
backbone.js ×1
event-loop ×1
java ×1
jquery ×1
laravel ×1
php ×1
play2-mini ×1
polling ×1
python ×1
spring ×1
tornado ×1
zeromq ×1