• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MessageChannels类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.integration.dsl.channel.MessageChannels的典型用法代码示例。如果您正苦于以下问题:Java MessageChannels类的具体用法?Java MessageChannels怎么用?Java MessageChannels使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MessageChannels类属于org.springframework.integration.dsl.channel包,在下文中一共展示了MessageChannels类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: amqpNewOrderEventInboundFlow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
public IntegrationFlow amqpNewOrderEventInboundFlow() {
    return IntegrationFlows.from(Amqp.inboundAdapter(rabbitMQConnection(), queueNewRealizations))
            .channel(MessageChannels.executor(Executors.newCachedThreadPool()))
            .transform(this::performNewOrderEventUnmarshaling)
            .publishSubscribeChannel(c -> c
                    .subscribe(s -> s
                            .<NewOrderEvent, Boolean>route(NewOrderEvent::isPriorityRealization, mapping -> mapping
                                    .subFlowMapping(false, sf -> sf
                                            .channel(IntegrationFlowKeys.NOT_PRIORITY_ORDER_PROCESSING_QUEUE))
                                    .subFlowMapping(true, sf -> sf
                                            .channel(IntegrationFlowKeys.PRIORITY_ORDER_PROCESSING_QUEUE))))
                    .subscribe(s -> s
                            .transform(orderReadyMapper::toOrderReady)
                            .channel(IntegrationFlowKeys.NEW_ORDER_OUT_CHANNEL)))
            .get();
}
 
开发者ID:MarcinStachowiak,项目名称:spring-integration-dsl-samle,代码行数:18,代码来源:NewOrderIncommingFlowConfiguration.java


示例2: newOrderEventProcessingFlow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
private IntegrationFlowBuilder newOrderEventProcessingFlow(IntegrationFlowBuilder builder, boolean priorityQueue) {
    return builder
            .split(NewOrderEvent.class, NewOrderEvent::getItems)
            .transform(orderItemMapper::toOrderItemDs)
            .channel(MessageChannels.queue(10))
            .publishSubscribeChannel(c2 -> c2
                    .subscribe(s2 -> s2
                            .handle(m -> orderPreparationService.prepare((OrderItemDs) m.getPayload(), false)))
                    .subscribe(s2 -> s2
                            .aggregate(aggregator -> aggregator
                                    .outputProcessor(group -> group
                                            .getMessages()
                                            .stream()
                                            .map(m -> ((OrderItemDs) m.getPayload()).getItemName())
                                            .collect(Collectors.joining(","))))
                            .handle(m -> System.out.println(m.getPayload()))));
}
 
开发者ID:MarcinStachowiak,项目名称:spring-integration-dsl-samle,代码行数:18,代码来源:NewOrderIncommingFlowConfiguration.java


示例3: amqpNewOrderEventInboundFlow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
public IntegrationFlow amqpNewOrderEventInboundFlow() {
    return IntegrationFlows.from(Amqp.inboundAdapter(rabbitMQConnection(), queueOrderReady))
            .channel(MessageChannels.executor(Executors.newCachedThreadPool()))
            .transform(this::performOrderReadyUnmarshaling)
            .handle(m -> sentNotifiation((OrderReady) m.getPayload()))
            .get();
}
 
开发者ID:MarcinStachowiak,项目名称:spring-integration-dsl-samle,代码行数:9,代码来源:OrderReadyIncommingFlowConfiguration.java


示例4: flow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
public IntegrationFlow flow() {
	String to = env.getProperty("queues.portfolio.creation");
	return IntegrationFlows
		.from(MessageChannels.publishSubscribe(Channels.PortfolioInitializationRequest))
		.transform(Transformers.toJson(mapper()))
		.handle(Amqp
			.outboundGateway(amqpTemplate)
			.routingKey(to))
		.transform(Transformers.fromJson(ContractPortfolioRelation.class, mapper()))
		.channel(MessageChannels.direct(Channels.PortfolioInitializationResponse))
		.get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:14,代码来源:IntegrationConfig.java


示例5: creationflow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
IntegrationFlow creationflow() {
	String to = env.getProperty("queues.contract.creation");
	return IntegrationFlows
		.from(MessageChannels.publishSubscribe(Channels.ContractCreationRequest))
		.transform(Transformers.toJson(mapper()))
		.handle(Amqp
			.outboundGateway(amqpTemplate)
			.routingKey(to)
		)
		.transform(Transformers.fromJson(Contract.class, mapper()))
		.channel(MessageChannels.direct(Channels.ContractCreationResponse))
		.get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:15,代码来源:IntegrationConfig.java


示例6: approbationflow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
IntegrationFlow approbationflow() {
	String to = env.getProperty("queues.contract.approbation");
	return IntegrationFlows
		.from(MessageChannels.publishSubscribe(Channels.ContractApprobationRequest))
		.transform(Transformers.toJson(mapper()))
		.handle(Amqp
			.outboundGateway(amqpTemplate)
			.routingKey(to)
		)
		.transform(Transformers.fromJson(Contract.class, mapper()))
		.channel(MessageChannels.direct(Channels.ContractApprobationResponse))
		.get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:15,代码来源:IntegrationConfig.java


示例7: initialPaymentflow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
IntegrationFlow initialPaymentflow() {
	String to = env.getProperty("queues.payment.initial-payment-reception");
	return IntegrationFlows
		.from(MessageChannels.publishSubscribe(Channels.InitialPaymentReceptionRequest))
		.transform(Transformers.toJson(mapper()))
		.handle(Amqp
			.outboundGateway(amqpTemplate)
			.routingKey(to)
		)
		.transform(Transformers.fromJson(Order.class, mapper()))
		.channel(MessageChannels.direct(Channels.InitialPaymentReceptionResponse))
		.get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:15,代码来源:IntegrationConfig.java


示例8: myFlow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
	public IntegrationFlow myFlow() {
		return IntegrationFlows.from(this.integerMessageSource(), c -> c.poller(Pollers.fixedRate(100)))
				.channel(this.inputChannel())
				.filter((Integer p) -> p > 0)
				.transform(Object::toString)
				.channel(MessageChannels.queue("sampleQueue"))
//				.handle(System.out::println)
				.get();
	}
 
开发者ID:netflix-spring-one,项目名称:sample-membership,代码行数:11,代码来源:Membership.java


示例9: myFlow

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
public IntegrationFlow myFlow() {
	return IntegrationFlows.from(this.integerMessageSource(), c ->
			c.poller(Pollers.fixedRate(100)))
			.channel(this.inputChannel())
			.filter((Integer p) -> p > 0)
			.transform(Object::toString)
			.channel(MessageChannels.queue())
			.get();
}
 
开发者ID:EldadDor,项目名称:Spring-Integration-ShowCase,代码行数:11,代码来源:FilterConfiguration.java


示例10: newOrderOutChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean(name= IntegrationFlowKeys.NEW_ORDER_OUT_CHANNEL)
 public MessageChannel newOrderOutChannel(){
     return MessageChannels.executor(Executors.newCachedThreadPool()).get();
}
 
开发者ID:MarcinStachowiak,项目名称:spring-integration-dsl-samle,代码行数:5,代码来源:OrderOutgoingFlowConfiguration.java


示例11: newOrderOutChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean(name= IntegrationFlowKeys.NEW_ORDER_OUT_CHANNEL)
public MessageChannel newOrderOutChannel(){
    return MessageChannels.executor(Executors.newCachedThreadPool()).get();
}
 
开发者ID:MarcinStachowiak,项目名称:spring-integration-dsl-samle,代码行数:5,代码来源:OrderReadyOutgoingFlowConfiguration.java


示例12: outboundRequests

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
public ExecutorChannel outboundRequests() {
	return MessageChannels.executor("outboundRequests", new SimpleAsyncTaskExecutor()).get();
}
 
开发者ID:mminella,项目名称:java-remote-partitioning,代码行数:5,代码来源:JobConfiguration.java


示例13: files

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel files() {
    return MessageChannels.direct().get();
}
 
开发者ID:livelessons-spring,项目名称:building-microservices,代码行数:5,代码来源:IntegrationConfiguration.java


示例14: contractCreationErrorChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel contractCreationErrorChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:InsuranceContractCreationCoreDslSupport.java


示例15: orderInitializationChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel orderInitializationChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:InsuranceContractCreationCoreDslSupport.java


示例16: initialPaymentReceptionErrorChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel initialPaymentReceptionErrorChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:InsuranceContractCreationCoreDslSupport.java


示例17: portfolioInitializationChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel portfolioInitializationChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:InsuranceContractCreationCoreDslSupport.java


示例18: createContractDocumentationChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel createContractDocumentationChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:InsuranceContractCreationCoreDslSupport.java


示例19: portfolioOrderErrorChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel portfolioOrderErrorChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:AbstractDslConfig.java


示例20: portfolioInitializationErrorChannel

import org.springframework.integration.dsl.channel.MessageChannels; //导入依赖的package包/类
@Bean
MessageChannel portfolioInitializationErrorChannel() {
	return MessageChannels.direct().get();
}
 
开发者ID:labcabrera,项目名称:lab-insurance,代码行数:5,代码来源:AbstractDslConfig.java



注:本文中的org.springframework.integration.dsl.channel.MessageChannels类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ChartMouseEventFX类代码示例发布时间:2022-05-23
下一篇:
Java ArrayUtils类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap