Available Attributes of the Job-Launching Gateway

作业启动网关具有以下可以设置为控制作业的属性:

The job-launching gateway has the following attributes that you can set to control a job:

  • id:标识底层 Spring bean 定义,它是一个下列实例:

    • EventDrivenConsumer

    • PollingConsumer(确切实现取决于组件的输入通道是一个`SubscribableChannel` 还是`PollableChannel`。)

    • PollingConsumer (The exact implementation depends on whether the component’s input channel is a SubscribableChannel or a PollableChannel.)

  • id: Identifies the underlying Spring bean definition, which is an instance of either:

    • EventDrivenConsumer

    • PollingConsumer(确切实现取决于组件的输入通道是一个`SubscribableChannel` 还是`PollableChannel`。)

    • PollingConsumer (The exact implementation depends on whether the component’s input channel is a SubscribableChannel or a PollableChannel.)

  • auto-startup:布尔标志,用于指示端点应在启动时自动启动。默认值为 true

  • auto-startup: Boolean flag to indicate that the endpoint should start automatically on startup. The default is true.

  • request-channel:此端点的输入`MessageChannel`。

  • request-channel: The input MessageChannel of this endpoint.

  • reply-channel:将结果 JobExecution 有效负载发送到的 MessageChannel

  • reply-channel: MessageChannel to which the resulting JobExecution payload is sent.

  • reply-timeout:可指定此网关在向答复通道成功发送答复消息之前等待多长时间(以毫秒为单位),然后才引发异常。此属性仅在通道可能阻塞(例如,在使用当前已满的边界队列通道时)时才适用。同时,请注意,在发送到 DirectChannel 时,调用发生在发送者的线程中。因此,发送操作失败可能是由下游的其他组件导致的。 reply-timeout 属性映射到底层 MessagingTemplate 实例的 sendTimeout 属性。如果未指定,则属性默认为 -1,这意味着,默认情况下,Gateway 无限期等待。

  • reply-timeout: Lets you specify how long (in milliseconds) this gateway waits for the reply message to be sent successfully to the reply channel before throwing an exception. This attribute applies only when the channel might block (for example, when using a bounded queue channel that is currently full). Also, keep in mind that, when sending to a DirectChannel, the invocation occurs in the sender’s thread. Therefore, the failing of the send operation may be caused by other components further downstream. The reply-timeout attribute maps to the sendTimeout property of the underlying MessagingTemplate instance. If not specified, the attribute defaults to -1, meaning that, by default, the Gateway waits indefinitely.

  • job-launcher:可选。接受自定义 JobLauncher bean 引用。如果未指定,则适配器会重新使用在`jobLauncher`的 id 下注册的实例。如果没有默认实例,则会引发异常。

  • job-launcher: Optional. Accepts a custom JobLauncher bean reference. If not specified, the adapter re-uses the instance that is registered under the id of jobLauncher. If no default instance exists, an exception is thrown.

  • order:当此端点连接为 @{41} 的订阅者时,指定调用顺序。

  • order: Specifies the order of invocation when this endpoint is connected as a subscriber to a SubscribableChannel.