Spring For Apache Kafka 2.0 Milestone 1 发布

栏目: 服务器 · Apache · 发布时间: 8年前

内容简介:Spring For Apache Kafka 2.0 Milestone 1 发布

Spring for Apache Kafka 2.0 的首个里程碑版本发布了 — Spring For Apache Kafka 2.0.0.M1

Spring for Apache Kafka 用于为 Apache Kafka 提供熟悉的 Spring 抽象。

2.0 系列中的重要新功能包括:

  • KafkaTemplate 中支持时间戳

  • Seek to beginning/end of topics

  • New threading model facilitated by KIP-62 - now that the consumer client does not rely on  poll() being called frequently, the threading model is much simpler; avoiding the need for internal  pause()resume() processing. Listeners are now always invoked on the consumer thread. This, in turn, has facilitated:

  • ConsumerAwareMessageListener (and  BatchConsumerAwareMessageListener ) are provided so that listener implementations can access the  Consumer<?, ?> object to perform operations such as  pause()resume()metrics() etc.

  • @KafkaListener POJO methods can now be annotated with  @SendTo to send the method result to some other topic.

@KafkaListener(id = "replyingListener", topics = "inTopic")
@SendTo("replyTopic")
public String replyingListener(String in) {
	return in.toUpperCase();
}

要了解更多信息,查看 Forwarding Listener Results using @SendTo发布主页

下载地址


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

洞察人心

洞察人心

Steve Portigal / 张振东、蒋晓、戴传庆、孙启玉 / 电子工业出版社 / 2015-10 / 65.00元

用户在哪里,有什么需求?他们为什么会选用竞争对手的产品而不是你的?从大数据中固然能得出一些结论,但是要搞清楚作为地球上顶级复杂生物的人的真实想法,还是走近他们,面对面访谈更直接有效。 用户访谈是一项技能,与一般的交谈有本质上的区别,需要遵从一定的步骤和方法。优秀的采访者用最自然的方式和用户进行交流,看似不经意,而实际上该说什么、何时说、如何说以及什么时候应该沉默,都有精准的权衡,都试图在闲聊......一起来看看 《洞察人心》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

在线进制转换器
在线进制转换器

各进制数互转换器

随机密码生成器
随机密码生成器

多种字符组合密码