English 中文(简体)
只传达一个信息,执行边远步骤
原标题:Consume only one message and execute remote step

我在“春 Bat”申请中,有经理和工人,使用与“积极分子”相处的远程分化。 我只想让我的工人在遥远的步行结束时就用电。 然而,一旦发出警告,听众将立即消费这些信息。 我怎么能对听众做修改,只修改一名执行职务的人,或每名工人一名消费者? 我指的是春季办公室文件如下配置。

我正在集中关注工人听众的聚集地点。 即便我把同意性改为1-1,但还是没有工作。 工人将立即消耗所有信息。

这里是管理人员配置:

@Bean 
public DirectChannel arequests() {
    return new DirectChannel(); 
}

@Bean
public IntegrationFlow aoutboundFlow(ActiveMQConnectionFactory connectionFactory) {
    return IntegrationFlows.from(arequests())
            .handle(Jms.outboundAdapter(connectionFactory).destination("testingReq"))
            .get();
}

@Bean
public DirectChannel breplies() {
    return new DirectChannel();
}

@Bean
public IntegrationFlow binboundFlow(ActiveMQConnectionFactory connectionFactory) {
    return IntegrationFlows.from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("testingRes"))
            .channel(breplies())
            .get();
}

@Bean
public Step managerStep() {
    return this.managerStepBuilderFactory.get("managerStep")
            .partitioner("workerStep", new BasicPartitioner())
            .gridSize(GRID_SIZE)
            .outputChannel(arequests())
            .inputChannel(breplies())
            .build();
}

@Bean
public Job remotePartitioningJob() {
    return jobBuilderFactory.get("remotePartitioningJob")
            .incrementer(new RunIdIncrementer())
            .start(managerStep())
            .build();
}

// And worker configuration:
@Bean
public DirectChannel crequests() {
    return new DirectChannel();
}

@Bean
public IntegrationFlow cinboundFlow(ActiveMQConnectionFactory connectionFactory) {
    return IntegrationFlows.from(
                    Jms.messageDrivenChannelAdapter(connectionFactory)
                            .destination("testingReq")
                            .configureListenerContainer(c -> c.concurrency("1-1")))
            .log(LoggingHandler.Level.INFO, "Received Message", m -> "Received message: " + m.getPayload())
            .channel(crequests())
            .get();
}

@Bean
public DirectChannel dreplies() {
    return new DirectChannel();
}

@Bean
public IntegrationFlow doutboundFlow(ActiveMQConnectionFactory connectionFactory) {
    return IntegrationFlows.from(dreplies())
            .handle(Jms.outboundAdapter(connectionFactory).destination("testingRes"))
            .get();
}

@Bean
public Step workerStep() {
    return this.workerStepBuilderFactory.get("workerStep")
            .inputChannel(crequests())
            .outputChannel(dreplies())
            .tasklet(tasklet(null))
            .build();
}

@Bean
@StepScope
public Tasklet tasklet(@Value("#{stepExecutionContext[ partition ]}") String partition) {
    return (contribution, chunkContext) -> {
        log.info("Started");
        Thread.sleep(20000);
        log.info("finished " + partition);
        return RepeatStatus.FINISHED;
    };
}

认可模式应当是非洲木材组织。 此外,我还试图要求管理人员开展一项有10个分职的远程工作,我可以看到有10个<代码>。 MESSAGE_COUNT through artemis queue stat. 在我开始该工人之后,“DELIVERING_COUNT号”的编号增加了10,该工人开始处理第1部分,但在我开始工作之后,我预计另外两名工人将处理第2部分或未完成的其他部分。

问题回答

一位消费者将有足够的信息来填写consumerWindowSize,用于流动控制。 我建议设立<条码>consumerWindowSize=0,作为你与URL的联系,例如:

tcp://host:61616?consumerWindowSize=0




相关问题
WAF FILE could not EXPORT due to no WEB PROJECT option found

I was trying to create a war file on spring tool suite 4 (windows version). But as I was about to export the it to the local file system, I couldn t find the web project (wiseai-console) option of the ...

Combine multiple cb.literal() into 1 Expression

I am working on a Spring Boot project that uses PostgreSQL. I want to create a advanced search feature where user can search through the jsonb column that I have in many of my tables. Somewhere in my ...

Error using criteriaBuilder.max() for LocalDate

I am trying to get max date using criteria builder in a subquery. But I am getting this error Required type: Expression Provided: Expression Subquery<LocalDate> subRoot = criteriaQuery....

热门标签