Skip to content
Art2link ESB v2.02 LTS HomeDocumentationBlogContact
Patterns/Endpoints & consumption/Polling consumer

Polling consumer

When a source cannot call you, you call it — on a schedule. A polling consumer pairs a clock with a caller: a Scheduler receive port fires on a recurrence, and a send port reaches out to the passive source and publishes whatever new it finds.

Plenty of systems have no way to push events. The polling consumer bridges them onto the bus with two ports. A receive port on the Scheduler adapter is the heartbeat — it wakes on its recurrence and publishes a tick. A send port subscribes to that tick, queries the source, and publishes a canonical message for each new item. From the bus’s point of view the feed looks event-driven, even though the source is passive.

MESSAGE BUS Scheduler receive port fires every 15 min publishes tick Send port makes the call subscribes to tick publishes records DB / FTP / API — passive call records

The two things to get right are what counts as new — a high-water mark, a status flag, moving processed files aside — so you do not re-read the same rows, and idempotency, since overlapping polls or retries can still re-surface an item. Pair it with an idempotent receiver and you are safe.

In Art2link the clock and the call are two ports. The Scheduler receive port is the heartbeat: set its recurrence — a fixed interval, a daily or date window, any cadence — and it fires on schedule. Its message can carry an optional payload, the natural place for the parameters each poll sends to the target — a since-timestamp, a page size, an account id. Each tick lands on the bus.

A send port makes the actual call. It subscribes to the Scheduler port’s ticks — you can match on Message Type as before, or, since every message carries the name of the port it came from, match on that directly:

EXPRESSIONpoll send port
{{Config.PortName}} == "SchedulerReceivePort"

Each tick wakes the send port, the call runs against the passive source — via any caller adapter (SQL, API, SFTP) — and whatever comes back is published as canonical messages for the rest of the flow.

Track your position, not just the clock. The interval decides how often you look; a durable high-water mark decides what you pick up. Without the latter, a missed or repeated poll quietly drops or duplicates work.