Available Attributes of the Job-Launching Gateway
The job-launching gateway has the following attributes that you can set to control a job:
-
id
: Identifies the underlying Spring bean definition, which is an instance of either:-
EventDrivenConsumer
-
PollingConsumer
(The exact implementation depends on whether the component’s input channel is aSubscribableChannel
or aPollableChannel
.)
-
-
auto-startup
: Boolean flag to indicate that the endpoint should start automatically on startup. The default istrue
. -
request-channel
: The inputMessageChannel
of this endpoint. -
reply-channel
:MessageChannel
to which the resultingJobExecution
payload is sent. -
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 aDirectChannel
, the invocation occurs in the sender’s thread. Therefore, the failing of the send operation may be caused by other components further downstream. Thereply-timeout
attribute maps to thesendTimeout
property of the underlyingMessagingTemplate
instance. If not specified, the attribute defaults to -1, meaning that, by default, theGateway
waits indefinitely. -
job-launcher
: Optional. Accepts a customJobLauncher
bean reference. If not specified, the adapter re-uses the instance that is registered under theid
ofjobLauncher
. If no default instance exists, an exception is thrown. -
order
: Specifies the order of invocation when this endpoint is connected as a subscriber to aSubscribableChannel
.