{"id":24901748,"url":"https://github.com/antonsjava/si-utils","last_synced_at":"2025-08-23T13:37:14.948Z","repository":{"id":100480159,"uuid":"606324724","full_name":"antonsjava/si-utils","owner":"antonsjava","description":"Spring integration utilities","archived":false,"fork":false,"pushed_at":"2023-12-17T17:50:31.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T08:02:10.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonsjava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-25T06:19:10.000Z","updated_at":"2023-02-25T19:01:40.000Z","dependencies_parsed_at":"2023-12-17T18:43:43.079Z","dependency_job_id":null,"html_url":"https://github.com/antonsjava/si-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antonsjava/si-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fsi-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fsi-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fsi-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fsi-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonsjava","download_url":"https://codeload.github.com/antonsjava/si-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fsi-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271749105,"owners_count":24814128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-01T21:17:35.392Z","updated_at":"2025-08-23T13:37:14.923Z","avatar_url":"https://github.com/antonsjava.png","language":"Java","readme":"# si-utils\n \n Spring integration utilities\n\n Just helper utilities for spring integration use them if you want.\n\n## log\n Logging is horrible. My main problem is that messages are logged using \n same logger as spring logs .....hard to read debug messages.\n\n You can specify your slf4j logger instance if you want.\n\n~~~\n  private static Logger xlog = LoggerFactory.getLogger(\"flow.xml\");\n  .handle(SlfHandler.of(lg -\u003e lg.debug(xlog, \"xml file {} processing start \", lg.header(FileHeaders.FILENAME))))\n~~~\n\n## on/off message source\n\n Sometimes it is useful to stop message source activity. (As poller is constantly reading).\n\n You can customize message in this way\n~~~\n  return OnOffMessageSource.of(originalsource)\n            .condition(() -\u003e fs.isDestinationFolderEmpty());\n~~~\n\n## RealHeadDirectoryScanner\n\n if You reads large directories you can use this one \n\n~~~\n  RealHeadDirectoryScanner scanner = new RealHeadDirectoryScanner(processBatchSize);\n  scanner.setFilter(compositeFilter);\n~~~\n\n## AdhocMessageConsumer\n\n If You need to define adhoc message handler, which just process message data and \n returns message to flow.\n\n~~~\n  .handle(AdhocMessageConsumer.consumeBy(m -\u003e activeXmlCounter.increase()))  \n~~~\n\n## InactivityDelayMessageSource\n\n If You need to delay message source request after pulling null message from internal \n message source.\n\n~~~\n   InactivityDelayMessageSource.of(source)\n        .inactivityDelay(Duration.ofMinutes(1))\n~~~\n\n## MessageSourceBatchAction\n\n Batch is continuous sequence of non null messages given by delegated message \n source. (sequence null, msg, msg, null, msg, null has two batches)\n \n This builder allows you to define action called before or after such batch.\n Action can be called as synchronous (default) or as asynchronous (new created \n thread). All throwables from action code are ignored. \n \n Start of batch is detected by non null message followed by null message. \n Action is called before first batch message is returned.\n (null, null, (action) msg, msg, null, (action) msg, null, null)\n \n End of batch is detected when delegated mesage source return null after non \n null message, So mesage source must be triggered after batch to obtain null \n message. Action is called before first non null messafe after batch is \n returned\n (null, null, msg, msg, (action) null, msg, (action) null, null)\n\n\n~~~\n  MessageSourceBatchAction.of(source)\n       .async(true)\n       .action(() -\u003e {\n               try { Thread.sleep(1000); } catch(Exception e) {}\n               solr.softCommit();\n            })\n       .after();\n~~~\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonsjava%2Fsi-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonsjava%2Fsi-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonsjava%2Fsi-utils/lists"}