Class TelegramUpdateUnpackProcessor
Inline processor that unpacks a Telegram from the exchange body
and populates on the inbound message.
Use this after Unmarshal(TelegramUpdateSerializer, typeof(Update)) in a webhook route:
From(Http.Listen("/tg/webhook"))
.Unmarshal(new TelegramUpdateSerializer(), typeof(Update))
.Process(new TelegramUpdateUnpackProcessor())
.To("direct://tg-dispatch");
Or use the convenience extension: .UnpackTelegramUpdate().
After this processor runs the exchange has the same headers as a long-polling
exchange, ensuring uniform downstream processing.
public sealed class TelegramUpdateUnpackProcessor : IProcessor
Inheritance
Implements
Methods
Process(IExchange, CancellationToken)
Processes the exchange asynchronously.
public Task Process(IExchange exchange, CancellationToken ct = default)