title: How to pass run time argument to Itemreader while running Job
body: <p>I am using rabbit-messaging Queue and Spring batch as combination. Producer service will publish the message to queue. Here my code is consumer for which i am using spring batch to read, process and write. Here when message pushed to queue i have to trigger the job(means no controller end point) . For that purpose i am using <strong>@RabbitListener("queue_Name)</strong> which will listen when a new message publishes and it also receive message. Below is the code.</p>
  
  <pre><code>@EnableRabbit
  public class Eventscheduler {
  
      @Autowired
      Job csvJob;
  
      @Autowired
      private JobLauncher jobLauncher;
  
      //@Scheduled(cron="0 */5 * ? * *")
      @RabbitListener(queues ="BulkSolve_GeneralrequestQueue")
      public void trigger(){
          Reader.batchstatus=false;
          Map&lt;String,JobParameter&gt; maps= new HashMap&lt;String,JobParameter&gt;();
  
          maps.put("time", new JobParameter(System.currentTimeMillis()));
          JobParameters jobParameters = new JobParameters(maps);
          JobExecution execution=null;
          try {
              //JobLauncher jobLauncher = new JobLauncher();
               execution=jobLauncher.run(csvJob, jobParameters);
          } catch (JobExecutionAlreadyRunningException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (JobRestartException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (JobInstanceAlreadyCompleteException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (JobParametersInvalidException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          System.out.println("JOB Executed:" + execution.getStatus());
  
      }
  
  }
  </code></pre>
  
  <p>Here my problem is here i am already reading published message then how i can pass that message pojo to ItemReader? before triggering job.SO that my ItemReader will read that message. Can any one help me to guide how to achieve this?</p>
  
  <p>Thanks,</p>